Deploy Docs #87
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 Docs | |
| on: | |
| workflow_run: | |
| workflows: ['Publish to NPM'] | |
| types: | |
| - completed | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| permissions: write-all | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - uses: actions/configure-pages@v3 | |
| - name: Build | |
| run: | | |
| npm install | |
| npm run deploy-storybook | |
| echo "react-css.squidit.com.br" > CNAME | |
| cd storybook-static | |
| echo "react-css.squidit.com.br" > CNAME | |
| - name: Upload Storybook artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: storybook-static/ | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |