-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (70 loc) · 2.16 KB
/
Copy pathdeploy.yml
File metadata and controls
76 lines (70 loc) · 2.16 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
name: Deploy to GitHub Pages
# Restored. `bc104f2` ("checkpoint: preserve current workspace state",
# Chronos Bot, 2026-05-18) deleted this file as part of banking a dirty
# working tree, and with it went every signal from this repo: the last run
# was 2026-04-02 and an external health census read the site as 155 days
# stale. A checkpoint commit must not be able to retire a repository's only
# gate silently.
#
# Two changes on restore:
# - the deploy is now gated on `npm run validate` (html-validate +
# stylelint), which the repo has always defined and CI never ran, so a
# broken page cannot publish;
# - a daily schedule, because a static site that nobody pushes to otherwise
# reports nothing at all about whether it still builds and deploys.
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: "53 13 * * *"
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
validate:
runs-on: ubuntu-latest
# Measured 2026-09-04: `npm ci` plus `npm run validate` completes in
# well under a minute. Ten minutes bounds a hung registry fetch.
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install locked dependencies
run: npm ci
- name: Validate HTML and CSS
run: npm run validate
deploy:
needs: validate
# A pull request validates but must never publish.
if: github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
with:
enablement: true
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "."
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4