Skip to content

Commit 2d6db12

Browse files
fix: github workflows (#205)
* fix: add env and pass token within publish-release-to-gh-pages job * require secret * remove environment * feat: add deploy_token to main.yml * chore: remove environment * revert removing environment from publish-to-gh-pages * fix: add secrets to be passed * Revert "fix: add secrets to be passed" This reverts commit aa5da96. * fix: require deploy_token for publish-release.yml * explicitly specify the DEPLOY_TOKEN
1 parent 304683a commit 2d6db12

5 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,4 @@ jobs:
7373
uses: ./.github/workflows/publish-release.yml
7474
secrets:
7575
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
76+
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}

.github/workflows/publish-gh-pages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
destination_dir:
77
required: true
88
type: string
9+
secrets:
10+
DEPLOY_TOKEN:
11+
required: true
912

1013
jobs:
1114
publish-to-gh-pages:

.github/workflows/publish-main-gh-pages.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
publish-to-gh-pages:
99
name: Publish build to `latest` directory of `gh-pages` branch
1010
uses: ./.github/workflows/publish-gh-pages.yml
11-
secrets: inherit
1211
with:
1312
destination_dir: latest
13+
secrets:
14+
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}

.github/workflows/publish-rc-gh-pages.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
publish-to-gh-pages:
2121
name: Publish build to `rc-${{ needs.get-release-version.outputs.release-version }}` directory of `gh-pages` branch
2222
uses: ./.github/workflows/publish-gh-pages.yml
23-
secrets: inherit
2423
needs: get-release-version
2524
with:
2625
destination_dir: rc-${{ needs.get-release-version.outputs.release-version }}
26+
secrets:
27+
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}

.github/workflows/publish-release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
secrets:
66
NPM_TOKEN:
77
required: true
8+
DEPLOY_TOKEN:
9+
required: true
810

911
jobs:
1012
publish-release:
@@ -99,3 +101,5 @@ jobs:
99101
uses: ./.github/workflows/publish-gh-pages.yml
100102
with:
101103
destination_dir: v${{ needs.get-release-version.outputs.RELEASE_VERSION }}
104+
secrets:
105+
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}

0 commit comments

Comments
 (0)