Repository navigation
87 lines (73 loc) · 2.11 KB
/
Copy pathdeploy.yml
File metadata and controls
87 lines (73 loc) · 2.11 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
name: Validate and deploy site
on:
pull_request:
push:
repository_dispatch:
types:
- cv-published
workflow_dispatch:
permissions:
contents: read
concurrency:
group: site-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Optional: uncomment this job when changing the photographed-card utility.
# image-utility:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v7
#
# - name: Set up Python
# uses: actions/setup-python@v6
# with:
# python-version: "3.13"
#
# - name: Install image utility dependency
# run: python -m pip install opencv-python
#
# - name: Test blended image redaction
# run: python -m unittest discover -s test -p '*_test.py'
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Install accessibility test browser
run: npx playwright install --with-deps chromium
- name: Download current CV
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: npm run sync:cv
- name: Check formatting
run: npm run format:check
- name: Validate and build
run: npm run check
- name: Upload site artifact
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v5
with:
path: dist
deploy:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Configure GitHub Pages
uses: actions/configure-pages@v6
- name: Deploy
id: deployment
uses: actions/deploy-pages@v5