Skip to content

Commit 4d3dbcf

Browse files
committed
chore: add ci for docs
1 parent 95e7025 commit 4d3dbcf

File tree

5 files changed

+27
-14
lines changed

5 files changed

+27
-14
lines changed

.github/workflows/documentation.yml

+24-11
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ on:
66
paths:
77
- "docs/**"
88
branches:
9-
- master
9+
- main
1010
# trigger deployment manually
1111
workflow_dispatch:
1212

13+
permissions:
14+
contents: write
15+
pages: write
16+
id-token: write
17+
1318
jobs:
14-
deploy:
19+
build:
1520
runs-on: ubuntu-latest
1621
defaults:
1722
run:
@@ -43,17 +48,25 @@ jobs:
4348
run: npm install
4449

4550
- name: Build VitePress site
46-
run: npm run build
51+
run: npm run docs:build
4752

4853
- name: Bundle CNAME with site dist
4954
run: cp CNAME .vitepress/dist
5055

51-
- name: Deploy to GitHub Pages
52-
uses: crazy-max/ghaction-github-pages@v4
56+
57+
- name: Upload artifact
58+
uses: actions/upload-pages-artifact@v3
5359
with:
54-
# deploy to gh-pages branch
55-
target_branch: gh-pages
56-
# deploy the default output dir of VitePress
57-
build_dir: docs/.vitepress/dist
58-
env:
59-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
path: docs/.vitepress/dist
61+
# Deployment job
62+
deploy:
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
needs: build
67+
runs-on: ubuntu-latest
68+
name: Deploy
69+
steps:
70+
- name: Deploy to GitHub Pages
71+
id: deployment
72+
uses: actions/deploy-pages@v4

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vfox.lhan.me

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hero:
88
tagline: 😉Easily manage all your SDK versions~
99
image:
1010
src: /logo.png
11-
alt: VitePress
11+
alt: vfox
1212
actions:
1313
- theme: brand
1414
text: 👋Get Started

docs/zh-hans/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hero:
88
tagline: 😉轻松管理你的工具和运行环境~
99
image:
1010
src: /logo.png
11-
alt: VitePress
11+
alt: vfox
1212
actions:
1313
- theme: brand
1414
text: 👋快速上手

docs/zh-hans/usage/all-commands.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# 所有命令
22

33

4-
54
## List
65

76
查看当前已安装的所有SDK版本。

0 commit comments

Comments
 (0)