Build website #3041
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 website | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# TODO: make this workflow run conditional on a commit actually being created | |
workflow_run: | |
workflows: [Update schedule] | |
types: [completed] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
node-version: "18.2.x" | |
- uses: pnpm/[email protected] | |
with: | |
version: 6.0.2 | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v3 | |
- run: pnpm install | |
- run: pnpm build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./dist | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: build | |
runs-on: ubuntu-latest | |
name: Deploy | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |