Repository navigation
54 lines (44 loc) · 1.35 KB
/
Copy pathpages.yml
File metadata and controls
54 lines (44 loc) · 1.35 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
name: Deploy GitHub Pages
on:
push:
branches: [main]
paths:
- "docs/**"
- "assets/**"
- "registry.json"
workflow_dispatch:
permissions: {}
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Copy registry into docs for client-side fetch
run: cp registry.json docs/registry.json
- name: Copy assets into docs
run: |
mkdir -p docs/assets
cp -r assets/* docs/assets/ 2>/dev/null || true
# The footer date is the date of the deployed commit, stamped at deploy
# time. It is never computed in the browser, so it cannot claim the
# catalog is fresher than it is.
- name: Stamp footer with deployed commit date
run: |
updated="$(git log -1 --format=%cs)"
sed -i "s|<span id=\"buildDate\"></span>|<span id=\"buildDate\">Updated ${updated}</span>|" docs/index.html
grep -q "Updated ${updated}" docs/index.html
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: docs
- uses: actions/deploy-pages@v5
id: deployment