Skip to content

Publish GitHub Pages #34

Publish GitHub Pages

Publish GitHub Pages #34

name: Publish GitHub Pages
on:
workflow_dispatch:
workflow_run:
workflows: [ Publish Package to npmjs ]
types:
- completed
permissions:
contents: read
pages: write
id-token: write
jobs:
test:
uses: ./.github/workflows/test.yml
deploy:
needs: test
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- run: npm i
- run: npm run build-storybook
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "./storybook-static"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3