Skip to content

Commit 5f8021b

Browse files
committed
ci: Switch Storybook Pages deploy to GitHub Actions
1 parent 6f28f52 commit 5f8021b

1 file changed

Lines changed: 25 additions & 12 deletions

File tree

.github/workflows/storybook-pages.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ on:
1313
- '**.yaml'
1414
- '**.json'
1515

16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
1621
jobs:
17-
build-and-deploy:
22+
build:
1823
if: startsWith(github.event.head_commit.message, 'chore(release)')
1924
runs-on: ubuntu-latest
20-
permissions:
21-
contents: write
22-
pages: write
23-
id-token: write
2425

2526
steps:
26-
- uses: actions/checkout@v6
27+
- uses: actions/checkout@v4
2728
with:
2829
fetch-depth: 0
2930

@@ -36,10 +37,22 @@ jobs:
3637
- name: Build Storybook static site
3738
run: pnpm nx run @soundtouchjs/storybook:build-storybook
3839

39-
- name: Deploy to GitHub Pages
40-
uses: peaceiris/actions-gh-pages@v4
40+
- name: Setup GitHub Pages
41+
uses: actions/configure-pages@v5
42+
43+
- name: Upload Storybook artifact
44+
uses: actions/upload-pages-artifact@v3
4145
with:
42-
github_token: ${{ secrets.GITHUB_TOKEN }}
43-
publish_dir: ./static-storybook
44-
publish_branch: gh-pages
45-
force_orphan: true
46+
path: ./static-storybook
47+
48+
deploy:
49+
needs: build
50+
runs-on: ubuntu-latest
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)