Build and Deploy Documentation #133
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/github-pages-deploy-action@v4.4.1 | |
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' |