Merge dataset-page-links: dataset page links, cc_datasets(), the reco… #56
This file contains hidden or 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
| # build the explorer and publish it to GitHub Pages (calcofi.io/explore/). the data objects are not in the | |
| # repo: VITE_DATA_URL points the app at GCS (the Phase-0 spike cut for now; the release catalog in Phase 1). | |
| name: 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: actions/setup-node@v4 | |
| with: { node-version: 22, cache: npm } | |
| - run: npm ci | |
| - run: npx tsc --noEmit | |
| - run: npx vite build | |
| env: | |
| # the bucket root the catalog's object paths hang off, and the releases prefix under it. | |
| # the real release since v2026.09.04 (2026-09-04), the first to ship the browser-shaped | |
| # objects (obs_bio, obs_env, sample_root, sample_spatial, climatology); before that the | |
| # site read the explore-dev cut of v2026.08.25 (explore-dev-root/ + explore-dev/releases). | |
| VITE_DATA_URL: https://storage.googleapis.com/calcofi-db/ | |
| VITE_RELEASE_PREFIX: ducklake/releases | |
| VITE_BASE: /explore/ | |
| # the feedback endpoint (calcofi4r::cc_feedback_script() deployed as a web app): a repository variable, so | |
| # setting it needs no code change; empty = the dialog offers the prefilled GitHub issue only | |
| VITE_FEEDBACK_URL: ${{ vars.VITE_FEEDBACK_URL }} | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: { path: dist } | |
| 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 |