Skip to content

Commit 17b1f81

Browse files
committed
chore: fix gh-pages deploy
1 parent 26b85c4 commit 17b1f81

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,26 @@ jobs:
4343
with:
4444
token: ${{ secrets.CODECOV_TOKEN }}
4545

46-
- name: Release & deploy to GitHub Pages
46+
- name: Release
4747
run: |
48-
git config --global user.name $user_name
49-
git config --global user.email $user_email
50-
git remote set-url origin https://${github_token}@github.com/${repository}
48+
git config --global user.name $USER_NAME
49+
git config --global user.email $USER_EMAIL
50+
git remote set-url origin https://${GITHUB_TOKEN}@github.com/${REPOSITORY}
5151
yarn release
52+
env:
53+
USER_NAME: 'github-actions[bot]'
54+
USER_EMAIL: 'github-actions[bot]@users.noreply.github.com'
55+
REPOSITORY: ${{ github.repository }}
56+
GITHUB_TOKEN: ${{ github.token }} #GITHUB_TOKEN is required
57+
58+
- name: Deploy
59+
run: |
60+
git config --global user.name $USER_NAME
61+
git config --global user.email $USER_EMAIL
62+
git remote set-url origin https://${DEPLOY_ACCESS_TOKEN}@github.com/${REPOSITORY}
5263
yarn deploy -m "${{ github.event.head_commit.message }}"
5364
env:
54-
user_name: 'github-actions[bot]'
55-
user_email: 'github-actions[bot]@users.noreply.github.com'
56-
github_token: ${{ secrets.DEPLOY_ACCESS_TOKEN }}
57-
repository: ${{ github.repository }}
65+
USER_NAME: 'github-actions[bot]'
66+
USER_EMAIL: 'github-actions[bot]@users.noreply.github.com'
67+
DEPLOY_ACCESS_TOKEN: ${{ secrets.DEPLOY_ACCESS_TOKEN }}
68+
REPOSITORY: ${{ github.repository }}

0 commit comments

Comments
 (0)