Skip to content

fix(deploy): build via npm run build so the fetch scripts run in CI #3

fix(deploy): build via npm run build so the fetch scripts run in CI

fix(deploy): build via npm run build so the fetch scripts run in CI #3

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Check & build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
# FR-4: the fetch step runs inside `npm run build` and must FAIL LOUDLY
# if a pinned engine document moved. Keeping it as an explicit step makes
# the failure legible in Checks.
- name: Fetch engine docs, release, discussions
run: npm run fetch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Type check
run: npm run check
- name: Build
run: npx astro build
- name: Upload site artifact (for PR inspection)
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: site-preview
path: dist
retention-days: 7