File tree Expand file tree Collapse file tree 1 file changed +34
-24
lines changed
Expand file tree Collapse file tree 1 file changed +34
-24
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - master
7-
87jobs :
9- Build :
8+ docs :
109 runs-on : ubuntu-latest
10+
1111 steps :
12+ - uses : actions/checkout@v2
13+ with :
14+ # “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
15+ fetch-depth : 0
16+
17+ - name : Setup Node.js
18+ uses : actions/setup-node@v1
19+ with :
20+ node-version : " 14"
21+
22+ - name : Cache dependencies
23+ uses : actions/cache@v2
24+ id : yarn-cache
25+ with :
26+ path : |
27+ **/node_modules
28+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29+ restore-keys : |
30+ ${{ runner.os }}-yarn-
31+
32+ - name : Install dependencies
33+ if : steps.yarn-cache.outputs.cache-hit != 'true'
34+ run : yarn --frozen-lockfile
1235
13- - name : checkout code
14- uses : actions/checkout@v2
15- - name : actions/setup-node@v2
16- uses : actions/setup-node@v2
17- with :
18- node-version : ' 16.14'
19- cache : ' yarn'
20- cache-dependency-path : ' **/yarn.lock'
36+ - name : Build VuePress site
37+ run : yarn build
2138
22- - name : Compiling start
23- run : echo Compiling start!
24- - run : git config --global user.email "2979986590@qq.com"
25- - run : git config --global user.name "webVueBlog"
26- - run : yarn install && yarn build
27- - name : Deploy
28- uses : peaceiris/actions-gh-pages@v3
29- with :
30- deploy_key : ${{ secrets.AWESOME_CSS_TOKEN }}
31- external_repository : webVueBlog/awesome-css
32- # 推送的分支
33- publish_branch : dist
34- # 推送的内容
35- publish_dir : docs/.vuepress/dist
39+ - name : Deploy to GitHub Pages
40+ uses : crazy-max/ghaction-github-pages@v2
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.AWESOME_CSS_TOKEN }}
43+ with :
44+ target_branch : dist
45+ build_dir : docs/.vuepress/dist
You can’t perform that action at this time.
0 commit comments