name: Deploy to GitHub Pages on: push: branches: [main] workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: true jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 with: workspaces: parser - uses: actions/setup-node@v4 with: node-version: '24' cache: 'npm' cache-dependency-path: package-lock.json - run: npm ci # One parser binary builds every dataset; build-db.js reads the dataset # list from src/datasets.js and gzips each database in place, leaving no # uncompressed file behind. - name: Build databases run: | npm run build:rust npm run build:db # One Vite build produces every page. scripts/assemble-site.js copies the # emitted index.html to each dataset path (and the legacy nested URLs), # then fails the job if any uncompressed database reached the artifact. - name: Build and assemble site run: npm run build:site - uses: actions/upload-pages-artifact@v3 with: path: _site deploy: needs: build runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment uses: actions/deploy-pages@v4