GH Pages #230
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: GH Pages | |
| on: | |
| # push: | |
| # branches: | |
| # - master | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Merge Bot"] | |
| types: completed | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| name: Build and Deploy | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Yarn install | |
| uses: actions/setup-node@v1 | |
| - run: yarn install | |
| - name: Build DB | |
| uses: ./.github/actions/buildDB | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build static site | |
| run: yarn run build | |
| - name: Upload static files as artifact | |
| id: upload | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./dist | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| with: | |
| path: ./dist |