Skip to content

Commit

Permalink
Fix #312, Generate Documentation In All Scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
arielswalker committed Jul 26, 2021
1 parent 6df5bdc commit 1bb095f
Showing 1 changed file with 52 additions and 27 deletions.
79 changes: 52 additions & 27 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ on:

env:
SIMULATION: native
REPO_NAME: ${{ github.event.repository.name }}

jobs:
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
# Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
checks-for-duplicates:
runs-on: ubuntu-latest
# Map a step output to a job output
Expand All @@ -24,7 +25,7 @@ jobs:
do_not_skip: '["push", "workflow_dispatch", "schedule"]'

build-docs:
#Continue if checks-for-duplicates found no duplicates. Always runs for pull-requests.
# Continue if checks-for-duplicates found no duplicates. Always runs for pull-requests.
needs: checks-for-duplicates
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
name: cFE Documentation
Expand Down Expand Up @@ -92,7 +93,7 @@ jobs:
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
# Setup the build system
- name: Make Prep
run: make prep

Expand Down Expand Up @@ -126,21 +127,19 @@ jobs:
exit -1
fi
pdf-usersguide:
needs: build-usersguide
# Name the Job
name: PDF Users Guide
# Set the type of machine to run on
runs-on: ubuntu-18.04
- name: Cache cFS Build Environment for usersguide
id: cache-bundle
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/deploy/*
key: usersguide-buildnum-${{ github.run_number }}

steps:

- name: PDF generation installs
- name: Install Dependencies
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
run: |
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- name: PDF generation
- name: PDF Generation
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
run: |
set -x
Expand All @@ -151,7 +150,22 @@ jobs:
# Could add pandoc and convert to github markdown
# pandoc CFE_Users_Guide.pdf -t gfm
- name: Deploy
deploy-usersguide:
needs: build-usersguide
# Name the Job
name: Deploy Users Guide
# Set the type of machine to run on
runs-on: ubuntu-18.04

steps:
- name: Cache cFS Build Environment for usersguide
id: cache-bundle
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/deploy/*
key: usersguide-buildnum-${{ github.run_number }}

- name: Deploy to GitHub
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
Expand All @@ -164,9 +178,7 @@ jobs:
build-osalguide:
needs: checks-for-duplicates
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
# Name the Job
name: Osal Guide
# Set the type of machine to run on
runs-on: ubuntu-18.04

steps:
Expand All @@ -183,7 +195,7 @@ jobs:
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
# Setup the build system
- name: Make Prep
run: make prep

Expand Down Expand Up @@ -218,19 +230,12 @@ jobs:
exit -1
fi
pdf-osalguide:
needs: build-osalguide
# Name the Job
name: PDF Osal Guide
# Set the type of machine to run on
runs-on: ubuntu-18.04
steps:
- name: PDF generation installs
- name: Install Dependencies
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
run: |
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- name: PDF generation
- name: PDF Generation
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
run: |
mkdir deploy
Expand All @@ -240,7 +245,27 @@ jobs:
# Could add pandoc and convert to github markdown
# pandoc CFE_Users_Guide.pdf -t gfm
- name: Deploy
- name: Cache cFS Build Environment for osalguide
id: cache-bundle
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/deploy/*
key: osalguide-buildnum-${{ github.run_number }}

deploy-osalguide:
needs: build-osalguide
name: Deploy Osal Guide
runs-on: ubuntu-18.04

steps:
- name: Cache cFS Build Environment for osalguide
id: cache-bundle
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/deploy/*
key: osalguide-buildnum-${{ github.run_number }}

- name: Deploy to GitHub
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
Expand Down

0 comments on commit 1bb095f

Please sign in to comment.