hex/.github/workflows/site.yml
Kit Langton 0ed8354414 Move to dev and production branches
Work lands on dev, the default branch. production holds what was released
(app-v2.3.1) and moves only by a fast-forward from dev. Pushes to dev run the
checks, test builds, and the dev site deploy; stable releases run only from
production or an app-v tag, and the TypeScript SDK's version pull request
targets dev while publishing waits for production.
2026-10-25 06:46:14 -07:00

54 lines
1.4 KiB
YAML

name: Site
# Builds site/ and checks every download link on pull requests; a push to dev
# 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 production.
on:
pull_request:
paths:
- "site/**"
- ".github/workflows/site.yml"
- ".github/workflows/site-deploy.yml"
push:
branches: [dev]
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 == 'push' || inputs.mode == 'dev' || github.ref == 'refs/heads/production'
uses: ./.github/workflows/site-deploy.yml
with:
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'dev' }}
secrets: inherit