Skip to content

Commit

Permalink
Merge pull request #315 from ArielSAdamsNASA/fix-310-No-File-Found-Do…
Browse files Browse the repository at this point in the history
…cumentation-Workflow

Fix #310, No File Found Documentation Workflow

Renamed jobs and steps for clarity
Minor edits to step order in deploy jobs
  • Loading branch information
astrogeco committed Jul 22, 2021
2 parents 6df5bdc + 8dae824 commit 4e7357f
Showing 1 changed file with 49 additions and 22 deletions.
71 changes: 49 additions & 22 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ 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 +26,8 @@ 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 +95,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 +129,34 @@ jobs:
exit -1
fi
pdf-usersguide:
- 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 }}/build/*
key: usersguide-buildnum-${{ github.run_number }}

deploy-usersguide:
needs: build-usersguide
# Name the Job
name: PDF Users Guide
name: Deploy Users 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: Cache cFS Build Environment for usersguide
id: cache-bundle
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
key: usersguide-buildnum-${{ github.run_number }}

- name: Generate PDF
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
run: |
set -x
Expand All @@ -151,7 +167,7 @@ jobs:
# Could add pandoc and convert to github markdown
# pandoc CFE_Users_Guide.pdf -t gfm
- name: Deploy
- name: Deploy to GitHub
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
uses: JamesIves/[email protected]
with:
Expand All @@ -164,9 +180,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 +197,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 All @@ -204,33 +218,46 @@ jobs:
make_osalguide_stderr.txt
osal-apiguide-warnings.log
- name: Error Check
- name: Check for Errors
run: |
if [[ -s make_osalguide_stderr.txt ]]; then
cat make_osalguide_stderr.txt
exit -1
fi
- name: Warning Check
- name: Check for Warnings
run: |
if [[ -s osal-apiguide-warnings.log ]]; then
cat osal-apiguide-warnings.log
exit -1
fi
pdf-osalguide:
- 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 }}/build/*
key: osalguide-buildnum-${{ github.run_number }}

deploy-osalguide:
needs: build-osalguide
# Name the Job
name: PDF Osal Guide
# Set the type of machine to run on
name: Deploy Osal Guide
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: Cache cFS Build Environment for osalguide
id: cache-bundle
uses: actions/cache@v2
with:
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/build/*
key: osalguide-buildnum-${{ github.run_number }}

- name: Generate PDF
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
run: |
mkdir deploy
Expand All @@ -240,12 +267,12 @@ jobs:
# Could add pandoc and convert to github markdown
# pandoc CFE_Users_Guide.pdf -t gfm
- name: Deploy
- name: Deploy to GitHub
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: deploy
CLEAN: false
SINGLE_COMMIT: true
SINGLE_COMMIT: true

0 comments on commit 4e7357f

Please sign in to comment.