Main Storybook deploy #13
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: Deploy main Storybook | |
on: | |
workflow_run: | |
workflows: [Lint and test] | |
types: [completed] | |
branches: [main] | |
jobs: | |
publish-storybook: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout release branch | |
uses: actions/checkout@v4 | |
- name: "Restore build artifact: Storybook docs" | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: "lint-test.yml" | |
name: storybook-docs | |
path: dist/storybook | |
- name: "Restore build artifact: Storybook react" | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: "lint-test.yml" | |
name: storybook-react | |
# React storybook is deployed to the /storybook-react subdirectory. | |
# In the main docs storybook, the contents of /storybook-react | |
# are also shown using Storybook composition. | |
path: dist/storybook/storybook-react | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: dist/storybook |