File tree 1 file changed +51
-0
lines changed
1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : docs
2
+
3
+ on :
4
+ # trigger deployment on every push to main branch
5
+ push :
6
+ branches : [main]
7
+ # trigger deployment manually
8
+ workflow_dispatch :
9
+
10
+ jobs :
11
+ docs :
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ with :
17
+ # fetch all commits to get last updated time or other git log info
18
+ fetch-depth : 0
19
+
20
+ - name : Setup pnpm
21
+ uses : pnpm/action-setup@v2
22
+ with :
23
+ # choose pnpm version to use
24
+ version : 8
25
+ # install deps with pnpm
26
+ run_install : true
27
+
28
+ - name : Setup Node.js
29
+ uses : actions/setup-node@v4
30
+ with :
31
+ # choose node.js version to use
32
+ node-version : 20
33
+ # cache deps for pnpm
34
+ cache : pnpm
35
+
36
+ # run build script
37
+ - name : Build VuePress site
38
+ run : pnpm docs:build
39
+
40
+ # please check out the docs of the workflow for more details
41
+ # @see https://github.com/crazy-max/ghaction-github-pages
42
+ - name : Deploy to GitHub Pages
43
+ uses : crazy-max/ghaction-github-pages@v4
44
+ with :
45
+ # deploy to gh-pages branch
46
+ target_branch : gh-pages
47
+ # deploy the default output dir of VuePress
48
+ build_dir : docs/.vuepress/dist
49
+ env :
50
+ # @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
51
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments