Build website #3574
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@v4 | |
- uses: typst-community/setup-typst@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22.2.0" | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9.6 | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- run: pnpm install | |
- run: pnpm build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
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@v4 |