Skip to content

Commit 8ed5fb4

Browse files
committed
Fix #331, Skip deploy job instead of step
Moves the if condition up one level from the deploy step to the deploy job for both the deploy-usersguide and deploy-osalguide.
1 parent 4ad0677 commit 8ed5fb4

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)