release:doc #272
This file contains hidden or 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 Storybook to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| if: ${{ contains(github.event.head_commit.message, 'release:doc') }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v2 | |
| - name: Install pnpm | |
| run: | | |
| npm install -g pnpm | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --no-frozen-lockfile | |
| - name: Build Storybook | |
| run: | | |
| export NODE_OPTIONS=--max_old_space_size=4096 | |
| pnpm run storybook:build | |
| pnpm run docs | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| token: ${{ secrets.TOKEN_STORYBOOK }} | |
| branch: gh-pages # branch onde o GitHub Pages está configurado | |
| folder: storybook-static # diretório onde o Storybook foi construído |