Skip to content

Commit 48b737d

Browse files
authored
Ensure flow of deploy keys (#168)
1 parent deea9fa commit 48b737d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/_docs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Build Documentation
22

33
on:
44
workflow_call:
5+
secrets:
6+
deploy_key:
7+
required: false
8+
59

610
jobs:
711
build_docs:
@@ -64,7 +68,7 @@ jobs:
6468
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
6569
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
6670
with:
67-
deploy_key: ${{ secrets.ACTIONS_DOCUMENTATION_DEPLOY_KEY }}
71+
deploy_key: ${{ secrets.deploy_key }}
6872
publish_branch: master
6973
publish_dir: ./docs/build/html
7074
external_repository: NSLS-II/NSLS-II.github.io

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ jobs:
3333
needs: lint
3434
if: needs.check.outputs.branch-pr == ''
3535
uses: ./.github/workflows/_docs.yml
36+
secrets:
37+
deploy_key: ${{
38+
github.event_name == 'release'
39+
&& secrets.ACTIONS_DOCUMENTATION_DEPLOY_KEY
40+
|| ''
41+
}}
3642

3743
pypi:
3844
if: success() && github.event_name == 'release'

0 commit comments

Comments
 (0)