Repository navigation
68 lines (61 loc) · 1.88 KB
/
Copy pathdeploy.yml
File metadata and controls
68 lines (61 loc) · 1.88 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
name: Deploy Documentation Site
on:
push:
branches:
- main
# Deploy when the site's own content changes. Repository furniture cannot
# alter the rendered output, so republishing for it wastes a build and a
# Pages deployment. paths-ignore rather than paths: a new top-level site
# directory should publish by default rather than be silently skipped until
# someone remembers to add it here.
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'issue_template.md'
- 'pull_request_template.md'
- '.github/**'
- '.claude/**'
workflow_dispatch:
# Two deploys racing would publish whichever finishes last, which may be the
# older content. Serialise them, and never cancel a run that may be mid-publish.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build Documentation Site
runs-on: ubuntu-latest
steps:
# give the full commit history to get the last edited author
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Build documentation
run: npm run build
# The site is at the repo root here, so the build output is ./build,
# not ./documentation/build as it was in the monorepo.
- name: Upload build artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4