Skip to content

Commit 3371562

Browse files
authored
Merge pull request #317 from sil-org/feature/use-actions-deploy-pages
use actions/deploy-pages
2 parents 18b18de + 34f7c45 commit 3371562

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/gh-pages.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ name: github pages
33
on:
44
push:
55
branches:
6-
- develop # Set a branch name to trigger deployment
6+
- develop
77

88
jobs:
9-
deploy:
9+
build:
1010
runs-on: ubuntu-latest
1111
timeout-minutes: ${{ fromJSON(vars.DEFAULT_JOB_TIMEOUT_MINUTES) }}
12+
1213
steps:
1314
- uses: actions/checkout@v4
1415

@@ -25,16 +26,29 @@ jobs:
2526
restore-keys: |
2627
${{ runner.os }}-node-
2728
28-
- run: npm install -g sass
2929
- run: npm ci
3030
- run: npm test
3131

3232
- name: Build
3333
run: npm run build
3434

35-
- name: Deploy
36-
uses: peaceiris/actions-gh-pages@v3
37-
if: github.ref == 'refs/heads/develop'
35+
- name: Upload Pages artifact
36+
uses: actions/upload-pages-artifact@v4
3837
with:
39-
github_token: ${{ secrets.GITHUB_TOKEN }}
40-
publish_dir: ./storybook-static
38+
path: ./storybook-static
39+
40+
deploy:
41+
needs: build
42+
permissions:
43+
pages: write
44+
id-token: write
45+
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Deploy
53+
id: deployment
54+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)