Merge pull request #44 from sireto/42-frontend/lists #11
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 Deploy Storybook | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
build-and-deploy: | |
name: Build and Deploy Storybook to GitHub Pages | |
runs-on: ubuntu-latest | |
permissions: | |
# Grant write access to id-token (required by actions/deploy-pages) | |
id-token: write | |
contents: read # Ensure read access to contents for deploying | |
pages: write # Ensure write access to GitHub Pages | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
working-directory: frontend | |
run: | | |
yarn install | |
- name: Build Storybook | |
working-directory: frontend | |
run: | | |
yarn build-storybook # This builds the static files for Storybook | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: frontend/storybook-static # Path to the generated Storybook static folder | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |