Skip to content

Commit

Permalink
Fix #331, Skip documentation deploy job
Browse files Browse the repository at this point in the history
Moves the branch push check conditional "up" in the documentation build
workflow. The check now happens at the deploy job level instead of the
deploy step step for both the deploy-usersguide and deploy-osalguide.

This saves time by preventing loading extra VMs in pull requests and
other repository push events.
  • Loading branch information
astrogeco committed Aug 6, 2021
1 parent 871a2d7 commit 7216fa7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,10 @@ jobs:
key: usersguide-buildnum-${{ github.run_number }}

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
needs: build-usersguide
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}

steps:
- name: Cache cFS Build Environment for usersguide
Expand Down Expand Up @@ -258,6 +257,7 @@ jobs:
needs: build-osalguide
name: Deploy Osal Guide
runs-on: ubuntu-18.04
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}

steps:
- name: Cache cFS Build Environment for osalguide
Expand All @@ -268,11 +268,11 @@ jobs:
key: osalguide-buildnum-${{ github.run_number }}

- 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

0 comments on commit 7216fa7

Please sign in to comment.