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