Skip to content

Commit d770617

Browse files
committed
ci: add deploy to github pages step (#27)
1 parent 0ba37f2 commit d770617

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ jobs:
1010
name: Release
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@master
13+
- uses: actions/checkout@v3
14+
with:
15+
persist-credentials: false
1416
- uses: actions/setup-node@v3
1517
with:
1618
node-version-file: '.nvmrc'
1719
- run: npm ci
1820
- run: npm run build --if-present
1921
- run: npx semantic-release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
24+
- name: Deploy with gh-pages
25+
run: |
26+
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
27+
npx gh-pages -d build -u "github-actions-bot <support+actions@github.com>"
2028
env:
2129
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"bugs": {
2828
"url": "https://github.com/abolkog/js-playground/issues"
2929
},
30-
"homepage": "https://github.com/abolkog/js-playground",
30+
"homepage": "https://abolkog.github.io/js-playground",
3131
"browserslist": {
3232
"production": [
3333
">0.2%",

0 commit comments

Comments
 (0)