-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (70 loc) · 2.28 KB
/
Copy pathci.yml
File metadata and controls
82 lines (70 loc) · 2.28 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
---
name: CI - Build & Test
on:
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "LICENSE"
- "docs/**"
- "CITATION.cff"
- ".codespellrc"
- ".markdownlint.json"
- ".github/workflows/labeler.yml"
- ".github/workflows/stale.yml"
- ".github/workflows/management-insights.yml"
- ".github/workflows/cache-hygiene.yml"
- ".github/LABELER.yml"
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
attestations: write
contents: read
id-token: write
defaults:
run:
shell: bash
jobs:
build:
name: Build & Validate
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup build environment
uses: ./.github/actions/setup-build-env
with:
install-imagemagick: "true"
- name: Build site via justfile
run: just ci-build
- name: Build summary
run: |
set -euo pipefail
file_count=$(find public -type f | wc -l | tr -d ' ')
hashed_count=$(find public -type f -print | grep -Ec '\\.[a-f0-9]{12}\\.' || true)
{
echo "### CI Build Summary"
echo "- Files in public/: ${file_count}"
echo "- Fingerprinted assets: ${hashed_count}"
} >> "$GITHUB_STEP_SUMMARY"
if [ -f public/asset-manifest.json ]; then
echo "- Asset manifest: present" >> "$GITHUB_STEP_SUMMARY"
else
echo "- Asset manifest: missing" >> "$GITHUB_STEP_SUMMARY"
fi
- name: Upload build artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: site-build-${{ github.run_id }}
path: ./public
retention-days: 1
if-no-files-found: error
- name: Create build archive for provenance
run: tar -czf site-build-${{ github.run_id }}.tar.gz public
- name: Generate artifact attestation
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
with:
subject-path: site-build-${{ github.run_id }}.tar.gz