Skip to content

Build and publish the website #369

Build and publish the website

Build and publish the website #369

Workflow file for this run

name: Build and publish the website
on:
push:
branches: [main]
schedule:
- cron: '30 8 * * *'
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Install dependencies
run: yarn install
- name: Crawl data
run: yarn run crawl
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Build
run: yarn run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site
deploy:
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4