Skip to content

Commit 3e28650

Browse files
authored
feat(site): seed the product site from the Vite/React Router proof (#2)
* feat(site): seed the product site from the Vite/React Router proof Replaces the scaffold's placeholder SPA with the approved proof: React Router v7 in framework mode, prerendered to static HTML (no Node server at request time), styled with Tailwind and the vendored @cryptos-pki/ui kit (vendor/cryptos-ui, copied from cryptos-web; see its NOTICE for the commit). The page (split hero, what-it-is, trust model, FleetOS Manager section, footer with the trademark notices) and its content come straight from the proof; nothing about the look or copy changes here. Adds CI for the new build: a build+lint+typecheck job that also checks the prerendered output for broken internal links, a DCO check, and a release-drafter workflow (extends CryptOS-PKI/.github, first version 0.1.0, rc prereleases) in place of the scaffold's generic one. Actions across every PR workflow are pinned by commit SHA and moved to ubuntu-24.04. Swaps in the Apache 2.0 license plumbing the same way the license PR does, since this PR replaces every file the license PR touched under src/. README, AGENTS.md and CLAUDE.md are updated for the new layout. Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com> * fix(ci): allow the OFL-1.1 font license in the npm license check The vendored CryptOS UI kit's fonts (@fontsource-variable/inter, @fontsource/jetbrains-mono) ship under the SIL Open Font License, which the dependency-license allowlist didn't yet include. Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com> --------- Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com> Co-authored-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
1 parent 7098c3a commit 3e28650

230 files changed

Lines changed: 13990 additions & 1471 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/action-lint.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
actionlint:
2121
name: 🧹 Actionlint
2222
if: github.event.pull_request.draft == false
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
2424
timeout-minutes: 10
2525
steps:
2626
- name: 📥 Checkout
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
2828
- name: 🐹 Setup Go
29-
uses: actions/setup-go@v5
29+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
3030
with:
3131
go-version: "stable"
3232
- name: 🧹 Run actionlint

‎.github/workflows/action-test.yaml‎

Lines changed: 0 additions & 70 deletions
This file was deleted.

‎.github/workflows/ci.yml‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI (lint, typecheck, build)
2+
3+
# Lint, typecheck and build (prerender) the site on a GitHub-hosted Linux
4+
# runner, then check the prerendered output for broken internal links.
5+
#
6+
# Pull requests only, and not while the PR is a draft; the PR run covers what
7+
# merges, so nothing reruns on push to main. Skip when a change touches only
8+
# Markdown or issue templates.
9+
on:
10+
pull_request:
11+
branches: [main]
12+
types: [opened, synchronize, reopened, ready_for_review]
13+
paths-ignore:
14+
- "**.md"
15+
- ".github/ISSUE_TEMPLATE/**"
16+
17+
permissions:
18+
contents: read
19+
20+
# One run per PR per workflow: a new push cancels the older PR run.
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
build:
27+
name: 🧪 Build (lint, typecheck, prerender)
28+
if: github.event.pull_request.draft == false
29+
runs-on: ubuntu-24.04
30+
timeout-minutes: 15
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.0.0
34+
35+
- name: Set up Node
36+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.0.0
37+
with:
38+
node-version: lts/*
39+
cache: npm
40+
41+
- name: Install dependencies
42+
# `npm ci` rather than `npm install`: it installs exactly the
43+
# lockfile, including the vendored `@cryptos-pki/ui` `file:` link, and
44+
# fails if package.json and the lockfile disagree.
45+
run: npm ci
46+
47+
- name: Lint
48+
run: npm run lint
49+
50+
- name: Typecheck
51+
run: npm run typecheck
52+
53+
- name: Build (prerender)
54+
run: npm run build
55+
56+
- name: Check internal links in the prerendered output
57+
run: node scripts/check-links.mjs build/client

‎.github/workflows/job-dco.yaml‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: DCO
2+
# Developer Certificate of Origin: every commit in a pull request must carry a
3+
# `Signed-off-by:` trailer (`git commit -s`) naming the commit's author, with
4+
# the same name and email (compared case-insensitively). Merge commits are
5+
# skipped, since they add no authored change of their own.
6+
#
7+
# The commit list comes from the pull request API, so the job needs no
8+
# checkout, no Node action and no third-party DCO app: `gh` and `jq` ship on
9+
# the hosted runner. The API returns at most 250 commits for a pull request;
10+
# a longer one fails with a message rather than passing unchecked.
11+
#
12+
# Pull requests only, and not while the PR is a draft.
13+
on:
14+
pull_request:
15+
branches: [main]
16+
types: [opened, synchronize, reopened, ready_for_review]
17+
# One run per PR per workflow: a new push cancels the older PR run.
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
20+
cancel-in-progress: true
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
jobs:
25+
dco:
26+
name: ✍️ DCO sign-off
27+
if: github.event.pull_request.draft == false
28+
runs-on: ubuntu-24.04
29+
timeout-minutes: 5
30+
steps:
31+
- name: ✍️ Check every commit is signed off by its author
32+
env:
33+
GH_TOKEN: ${{ github.token }}
34+
REPO: ${{ github.repository }}
35+
PR: ${{ github.event.pull_request.number }}
36+
EXPECTED: ${{ github.event.pull_request.commits }}
37+
run: |
38+
set -euo pipefail
39+
commits="$(gh api --paginate "repos/$REPO/pulls/$PR/commits?per_page=100" --jq '.[]' | jq -s '.')"
40+
total="$(jq 'length' <<<"$commits")"
41+
if [ "$total" -lt "$EXPECTED" ]; then
42+
echo "::error::The API listed $total of $EXPECTED commits (it stops at 250). Split the pull request so every commit can be checked."
43+
exit 1
44+
fi
45+
missing="$(jq -r '
46+
.[]
47+
| select((.parents | length) < 2)
48+
| . as $k
49+
| ($k.commit.author.name | ascii_downcase) as $name
50+
| ($k.commit.author.email | ascii_downcase) as $email
51+
| select([$k.commit.message
52+
| scan("(?m)^Signed-off-by:[ \t]*([^<\n]*?)[ \t]*<([^>\n]*)>[ \t]*$")
53+
| select((.[0] | ascii_downcase) == $name and (.[1] | ascii_downcase) == $email)
54+
] | length == 0)
55+
| "\($k.sha[0:12]) \($k.commit.author.name) <\($k.commit.author.email)>"
56+
' <<<"$commits")"
57+
if [ -n "$missing" ]; then
58+
while IFS= read -r line; do
59+
echo "::error::Commit $line has no Signed-off-by line matching its author."
60+
done <<<"$missing"
61+
echo "Sign off each commit with 'git commit -s'. To fix commits already pushed,"
62+
echo "run 'git rebase --signoff origin/main' and force-push the branch."
63+
exit 1
64+
fi
65+
echo "All $total commits carry a sign-off matching their author."

‎.github/workflows/job-golic.yaml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020
golic:
2121
name: 🔏 License headers
2222
if: github.event.pull_request.draft == false
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
2424
timeout-minutes: 10
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v6
27+
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.0.0
2828
- name: Setup Go
29-
uses: actions/setup-go@v6
29+
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
3030
with:
3131
go-version: 'stable'
3232
- name: Install Task
33-
uses: arduino/setup-task@v2
33+
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
3434
with:
3535
version: 3.x
3636
# setup-task reads its token from this input, not env. Without it

‎.github/workflows/job-label-checker.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
autolabel:
3636
name: 🏷️ Autolabel
3737
if: github.event.pull_request.draft == false
38-
runs-on: ubuntu-latest
38+
runs-on: ubuntu-24.04
3939
timeout-minutes: 10
4040
# The addLabels call below targets the Issues API (a PR's labels live under
4141
# /issues/{number}/labels), so this needs issues:write. On a PR, GitHub's own
@@ -96,7 +96,7 @@ jobs:
9696
# Run even if autolabel was skipped/failed; the label may already be present
9797
# from the PR title. Drafts are still skipped.
9898
if: always() && github.event.pull_request.draft == false
99-
runs-on: ubuntu-latest
99+
runs-on: ubuntu-24.04
100100
timeout-minutes: 10
101101
# Reading labels is the Issues API (a PR's labels live under
102102
# /issues/{number}/labels), so this needs issues:read. On a PR, GitHub's own

‎.github/workflows/job-label-sync.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ permissions:
1414
jobs:
1515
labeler:
1616
name: 🏷️ Sync labels
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-24.04
1818
timeout-minutes: 10
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
2222
- name: Reconcile labels with labels.yml
23-
uses: crazy-max/ghaction-github-labeler@v5
23+
uses: crazy-max/ghaction-github-labeler@24d110aa46a59976b8a7f35518cb7f14f434c916 # v5.3.0
2424
with:
2525
yaml-file: .github/labels.yml
2626
skip-delete: false

‎.github/workflows/job-license-check-npm.yaml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
npm:
2121
name: ⚖️ Dependency licenses (npm)
2222
if: github.event.pull_request.draft == false
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
2424
timeout-minutes: 15
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
2828

2929
- name: Setup Node
30-
uses: actions/setup-node@v4
30+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3131
with:
3232
node-version: lts/*
3333

@@ -38,4 +38,4 @@ jobs:
3838
run: |
3939
npx --yes license-checker-rseidelsohn \
4040
--production --excludePrivatePackages \
41-
--onlyAllow "MIT;ISC;Apache-2.0;BSD-2-Clause;BSD-3-Clause;0BSD;CC0-1.0;Unlicense;BlueOak-1.0.0;Python-2.0;MPL-2.0;CC-BY-4.0"
41+
--onlyAllow "MIT;ISC;Apache-2.0;BSD-2-Clause;BSD-3-Clause;0BSD;CC0-1.0;Unlicense;BlueOak-1.0.0;Python-2.0;MPL-2.0;CC-BY-4.0;OFL-1.1"

‎.github/workflows/job-pr-checks.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
checks:
3030
name: ✅ PR Checks
3131
if: github.event.pull_request.draft == false
32-
runs-on: ubuntu-latest
32+
runs-on: ubuntu-24.04
3333
timeout-minutes: 10
3434
steps:
3535
- name: 📝 PR Title
36-
uses: amannn/action-semantic-pull-request@v5
36+
uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5
3737
env:
3838
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3939

@@ -61,7 +61,7 @@ jobs:
6161
- name: Checkout
6262
id: checkout
6363
if: ${{ !cancelled() }}
64-
uses: actions/checkout@v6
64+
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.0.0
6565
with:
6666
fetch-depth: 0
6767

0 commit comments

Comments
 (0)