Version Packages (#340) #515
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Storybook to GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.tool-versions' | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: "Build" | |
shell: bash | |
run: | | |
echo "::group::Build" | |
pnpm install | |
pnpm build | |
echo "::endgroup::" | |
- name: "Move examples app build into storybook-static" | |
run: | | |
mv apps/examples/build/client/ apps/docs/storybook-static/examples | |
cp apps/docs/storybook-static/examples/index.html apps/docs/storybook-static/404.html | |
- name: "upload" | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: apps/docs/storybook-static | |
- id: deploy | |
name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 | |
with: | |
token: ${{ github.token }} |