hex/.github/workflows/site.yml
Dax Raad c88793b11a feat(release): serve Hex at anoma.ly/hex with its files at /hex/files
One site/cloudflare.config.ts defines the production Worker hex (anoma.ly/hex, bucket hex-production-files) and the dev Worker hex-dev (dev.anoma.ly/hex, bucket hex-dev-files), deployed only from CI with cf deploy --prebuilt --mode. The Worker serves the site and the release bucket; apps, scripts, the release workflow, and docs use https://anoma.ly/hex/files. Staging releases publish to the dev bucket; stable releases deploy the production site.
2026-10-23 08:57:57 -04:00

54 lines
1.3 KiB
YAML

name: Site
# Builds site/ and checks every download link on pull requests; a push to main
# deploys dev (https://dev.anoma.ly/hex). Production (https://anoma.ly/hex)
# deploys after a stable Release publishes, or by dispatching this workflow
# with mode production from main.
on:
pull_request:
paths:
- "site/**"
- ".github/workflows/site.yml"
- ".github/workflows/site-deploy.yml"
push:
branches: [main]
paths:
- "site/**"
- ".github/workflows/site.yml"
- ".github/workflows/site-deploy.yml"
workflow_dispatch:
inputs:
mode:
type: choice
options: [dev, production]
default: dev
permissions:
contents: read
concurrency:
group: site-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run build
- run: bun run check:downloads
deploy:
if: github.event_name != 'pull_request'
uses: ./.github/workflows/site-deploy.yml
with:
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'dev' }}
secrets: inherit