Files
luxe/.github/workflows/site.yml
Evan Whittaker 3042a3d3bd CI always starts and reports one CI passed check a ruleset can require; a prose-only change skips the jobs inside the run instead of skipping the run
A path filter on the trigger meant a docs-only pull request never got the checks a ruleset would require, so it could never merge. scripts/ci-changes.py decides from the diff whether the jobs have work, and CI passed sums them up, since a skipped matrix job reports under no name a ruleset can hold. The old filter also skipped crates/luxe-cli/guide.md, which the CLI compiles in, and docs/guide/, which the suite checks against the code; both now run the jobs.
2026-10-17 12:50:10 -05:00

67 lines
2.3 KiB
YAML

# Site — ships luxe.dev from `main` of the public repository.
#
# Deployed from here rather than by Cloudflare's Git integration: the Pages project takes direct
# uploads (`web/wrangler.jsonc`), and deploying from a workflow means the render check below stands
# between a merge and the live site. CI's `website` job already ran the full cross-browser suite on
# the pull request; this is the last look at exactly the files being uploaded.
name: Site
on:
workflow_dispatch:
push:
branches: [main]
# The site reads `docs/guide/` for the manual, so a guide-only change has to reach here
paths:
- "web/**"
- "docs/guide/**"
- ".github/workflows/site.yml"
permissions:
contents: read
# One deploy at a time, and never cancel one halfway through an upload.
concurrency:
group: site-deploy
cancel-in-progress: false
jobs:
deploy:
name: build · check · deploy
# The development repository shares this file and must never publish the site
if: github.repository == 'evanwhittaker/luxe'
runs-on: ubuntu-latest
timeout-minutes: 15
# The Cloudflare secrets live on this environment, so only this job can read them, and an
# approval rule added in the repository settings would gate every deploy
environment:
name: production
url: https://luxe.dev
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
cache-dependency-path: web/package-lock.json
- name: Install
run: npm ci
working-directory: web
- name: Build
run: npm run build
working-directory: web
- name: Render check
run: ./scripts/site-check.sh --no-build
# `--branch main` decides production: without it Wrangler reports whatever branch it sees, and
# anything that is not the project's production branch lands as a preview (see web/README.md)
- name: Deploy
run: npx wrangler pages deploy dist --branch main
working-directory: web
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}