-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 1.95 KB
/
Copy pathci.yml
File metadata and controls
73 lines (61 loc) · 1.95 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
name: CI
# This is the status check that guards `testing`. It runs on every pull
# request into `testing` and again on the merge commit.
on:
pull_request:
branches: [testing]
push:
branches: [testing]
# Push twice in a row and the first run is cancelled instead of queued.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
# Half one: is every file in bios/ well formed? This is the job that fails
# when a bio is missing a required key or the filename does not match `name`.
validate-bios:
name: Validate bios
permissions:
contents: read
# If the org has self-hosted or third-party runners, swap `runs-on` for
# one of their labels, e.g.:
# runs-on: my-org-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
- name: Validate bio files
run: python -m generator validate
# Half two: does the site actually render? The uploaded artifact lets a
# reviewer download the rendered HTML instead of taking the PR on faith.
build-site:
name: Build site
permissions:
contents: read
# If the org has self-hosted or third-party runners, swap `runs-on` for
# one of their labels, e.g.:
# runs-on: my-org-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build static site
run: python -m generator build
- name: Upload rendered site
uses: actions/upload-artifact@v4
with:
name: site-${{ github.sha }}
path: dist/
retention-days: 7