Build and Deploy Documentation #123
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 Documentation | |
on: | |
workflow_run: | |
workflows: ["Release"] | |
types: [completed] | |
branches: | |
- master | |
paths: | |
- 'src/**' | |
- 'stories/**' | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
- name: Install and Build 🔧 | |
run: | # Install npm packages and build the Storybook files | |
yarn install --frozen-lockfile | |
yarn build-storybook | |
- name: Deploy 🚀 | |
# https://github.com/JamesIves/github-pages-deploy-action | |
uses: JamesIves/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
folder: storybook-static # The folder that the build-storybook script generates files. | |
target-folder: examples | |
clean: true # Automatically remove deleted files from the deploy branch | |
commit-message: 'docs: update documentation site' |