Skip to content

Commit

Permalink
IC:2021-04-20, Add context check to docs deploy step
Browse files Browse the repository at this point in the history
Checks for the github context so the workflow only runs the deploy step when
it runs on a push event to the main branch
  • Loading branch information
astrogeco committed Apr 22, 2021
1 parent 397c6b1 commit 151bab9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ jobs:
fi
- name: PDF generation installs
if: ${{ github.event_name == 'push' }}
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
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
run: |
set -x
mkdir deploy
Expand All @@ -143,7 +143,7 @@ jobs:
# pandoc CFE_Users_Guide.pdf -t gfm
- name: Deploy
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -210,12 +210,12 @@ jobs:
fi
- name: PDF generation installs
if: ${{ github.event_name == 'push' }}
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
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
run: |
mkdir deploy
cd ./build/doc/osalguide/latex
Expand All @@ -225,7 +225,7 @@ jobs:
# pandoc CFE_Users_Guide.pdf -t gfm
- name: Deploy
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 151bab9

Please sign in to comment.