Deploy #10456
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 * * * *" # Run every hour | |
name: Deploy | |
jobs: | |
build_site: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- uses: actions/checkout@main | |
- name: 📚 Install node dependencies | |
run: nix develop -c pnpm install | |
- name: 🕷️ Scrape | |
run: nix develop -c pnpm scrape | |
- name: 🔨 Build | |
run: nix develop -c pnpm build | |
- name: 📤 Upload | |
uses: actions/upload-pages-artifact@main | |
with: | |
path: "build/" | |
deploy: | |
needs: build_site | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: 🚀 Deploy | |
id: deployment | |
uses: actions/deploy-pages@main |