Skip to content

Commit 7216fa7

Browse files
committed
Fix #331, Skip documentation deploy job
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.
1 parent 871a2d7 commit 7216fa7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/build-documentation.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,10 @@ jobs:
153153
key: usersguide-buildnum-${{ github.run_number }}
154154

155155
deploy-usersguide:
156-
needs: build-usersguide
157-
# Name the Job
158156
name: Deploy Users Guide
159-
# Set the type of machine to run on
160157
runs-on: ubuntu-18.04
158+
needs: build-usersguide
159+
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
161160

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

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

270270
- name: Deploy to GitHub
271-
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
272271
uses: JamesIves/github-pages-deploy-action@3.7.1
273272
with:
274273
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
275274
BRANCH: gh-pages
276275
FOLDER: deploy
277276
CLEAN: false
278277
SINGLE_COMMIT: true
278+

0 commit comments

Comments
 (0)