Repository navigation
61 lines (57 loc) · 1.56 KB
/
Copy pathdocs.yml
File metadata and controls
61 lines (57 loc) · 1.56 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
name: Deploy Docs
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
concurrency:
group: documentation-pages
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
if: >-
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'main' &&
github.event.workflow_run.head_sha == github.sha)
runs-on: ubuntu-latest
env:
DEPLOY_SHA: ${{ github.event.workflow_run.head_sha }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ env.DEPLOY_SHA }}
fetch-depth: 0
- name: Verify deployment commit
run: test "$(git rev-parse HEAD)" = "$DEPLOY_SHA"
- uses: actions/setup-node@v7
with:
node-version: "24.x"
cache: npm
cache-dependency-path: |
package-lock.json
website/package-lock.json
- run: npm ci
- run: npm run build
- run: npm ci --prefix website
- run: npm run docs:check
- run: npm --prefix website run check:examples
- run: npm run docs:build
- run: npm --prefix website run check:rendered
- uses: actions/upload-pages-artifact@v5
with:
path: website/dist
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v5
id: deployment