name: Site deploy # Builds site/ for one environment and deploys its Worker (the site at /hex and # the files at /hex/files: built installers and appcast, the dev notes, and the # frozen 2.3.1 bucket): dev -> https://dev.anoma.ly/hex, # production -> https://anoma.ly/hex. Split like Release (docs/releasing.md): # # - build runs repository code (bun install, site/scripts/build.ts) with no # environment and no secrets, and uploads the Worker's Build Output with a # SHA256SUMS whose digest it reports. # - deploy runs in the release environment and mints a short-lived Cloudflare # token from the token issuer after assuming the release role # (.github/release/cloudflare-token.sh). It checks out only .github/release/, # verifies the artifact against that digest, and runs only # .github/release/deploy-site.sh, which pins the Worker, routes, and # bindings and deploys with the cf CLI locked in .github/release/cf/. # - verify checks the live site and every download link without secrets. on: workflow_call: inputs: mode: type: string required: true permissions: contents: read jobs: build: runs-on: ubuntu-24.04 outputs: digest: ${{ steps.upload.outputs.digest }} defaults: run: working-directory: site steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.sha }} persist-credentials: false - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 - run: bun install --frozen-lockfile # The checks the Installers and Legacy appcast workflows ran before they # uploaded these files to the bucket. The site now serves them, so a # broken installer or appcast fails the deploy instead. - name: Check the legacy appcast run: | python3 -c 'import sys, xml.dom.minidom; xml.dom.minidom.parse(sys.argv[1])' ../packaging/macos/legacy-appcast.xml grep -Fq '