Workflow file for this run
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
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
name: Deploy Storybook | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.3] | |
defaults: | |
run: | |
shell: bash | |
working-directory: . | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node modules | |
# See https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows | |
id: cache-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} | |
- name: Install packages | |
run: npm ci | |
- name: Build docs | |
id: build | |
run: npm run storybook:build | |
- name: Upload docs as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: storybook-static/ | |
deploy: | |
permissions: | |
id-token: write | |
pages: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |