Repository navigation
82 lines (69 loc) · 2 KB
/
Copy pathpages.yml
File metadata and controls
82 lines (69 loc) · 2 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
name: Deploy VitePress site to Pages
on:
push:
branches: [main, v1]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
ref: main
path: main
fetch-depth: 0
- name: Checkout v1
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
ref: v1
path: v1
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1
with:
node-version: 24
cache: npm
cache-dependency-path: main/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d
- name: Build main docs (v2.0 — current)
working-directory: main
run: |
npm ci
npm run docs:build
- name: Build v1 docs (v1.x — stable)
working-directory: v1
run: |
npm ci
npm run docs:build
- name: Assemble combined site
run: |
mkdir -p site
cp -r main/docs/.vitepress/dist/. site/
mkdir -p site/v1
cp -r v1/docs/.vitepress/dist/. site/v1/
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9
with:
path: site
deploy:
# Every branch pushed above (main, v1) must also be listed in Settings >
# Environments > github-pages > Deployment branches, or this job 403s.
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346