-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (65 loc) · 2.16 KB
/
Copy pathdocs.yml
File metadata and controls
78 lines (65 loc) · 2.16 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
name: Deploy documentation
on:
push:
branches: [main]
paths:
- ".github/workflows/docs.yml"
- "docs/**"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Set up pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Configure GitHub Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Export documentation
run: pnpm --dir docs exec mint export --output ../docs.zip
- name: Prepare GitHub Pages artifact
run: |
mkdir pages
unzip -q docs.zip -d pages
touch pages/.nojekyll
- name: Archive GitHub Pages artifact
run: |
tar \
--dereference --hard-dereference \
--directory pages \
-cf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.
# upload-pages-artifact uses an unpinned upload-artifact reference internally,
# so create its expected artifact directly to satisfy the organization policy.
- name: Upload GitHub Pages artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: 1
if-no-files-found: error
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5