Skip to content

Commit 4a8bf84

Browse files
committed
ci: build
1 parent 5062410 commit 4a8bf84

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy VitePress
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v6
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v6
21+
with:
22+
node-version: 22
23+
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: latest
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Build documentation site
33+
run: pnpm run docs:build
34+
35+
- name: Deploy to GitHub Pages
36+
if: github.event_name != 'pull_request'
37+
uses: peaceiris/actions-gh-pages@v4
38+
with:
39+
personal_token: ${{ secrets.ACTION_PERSONAL_TOKEN }}
40+
publish_dir: .vitepress/dist
41+
external_repository: XTLS/XTLS.github.io
42+
publish_branch: gh-pages-next

0 commit comments

Comments
 (0)