-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (76 loc) · 2.62 KB
/
pages.yml
File metadata and controls
90 lines (76 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Deploys sky-viewer to GitHub Pages on every push to main.
#
# Uses the modern Actions-driven flow (Pages "Source: GitHub Actions"),
# so nothing gets committed to a gh-pages branch — the artifact is
# uploaded directly by actions/upload-pages-artifact and published by
# actions/deploy-pages.
name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
# Minimum privileges needed to publish via the Pages deployment API.
permissions:
contents: read
pages: write
id-token: write
# Serialize concurrent deploys so a second push doesn't overwrite an
# in-flight one.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Typecheck
run: npx tsc --noEmit
- name: Run unit tests
run: npx vitest run
- name: Build for production
run: npm run build
# .nojekyll disables GitHub Pages' Jekyll pipeline so files and
# folders starting with "_" (if any ever land here) aren't dropped.
# Cheap insurance even though our current dist/ tree uses none.
- name: Add .nojekyll
run: touch dist/.nojekyll
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# T061 - Lighthouse-CI gate (post-deploy). DEFERRED.
#
# Goal: fail CI if the deployed sites Lighthouse Performance score
# drops below 90. The 90 threshold matches both the parent feature's
# SC-009 (Lighthouse Performance >= 90 on a mid-tier mobile profile)
# and the constitution's User-Delight bar. SC-011 of feature 002
# likewise requires no main-view regression; Lighthouse is the
# canonical gate for "no main-view regression".
#
# Status: deferred. The exact action recipe and its assertion config
# need iteration in a separate PR before flipping on a job that gates
# the deploy. A starting point would be the treosh/lighthouse-ci-action
# at v11 with a .lighthouserc.json asserting
# categories:performance >= 0.9. See research.md R13 for the budget
# rationale.