File tree Expand file tree Collapse file tree 1 file changed +34
-22
lines changed Expand file tree Collapse file tree 1 file changed +34
-22
lines changed Original file line number Diff line number Diff line change 5
5
- cron : " */1 * * * *"
6
6
7
7
jobs :
8
- build :
8
+ Build :
9
9
runs-on : ubuntu-latest
10
-
11
10
steps :
12
- - name : Clone repository
13
- uses : actions/checkout@v2
14
11
15
- - name : Install deno
16
- uses : denolib/setup-deno@master
12
+ - name : checkout code
13
+ uses : actions/checkout@v2
14
+ - name : actions/setup-node@v2
15
+ uses : actions/setup-node@v2
16
+ with :
17
+ node-version : ' 16.14'
18
+ cache : ' yarn'
19
+ cache-dependency-path : ' **/yarn.lock'
20
+
21
+ - run : yarn install && yarn build
17
22
18
- - name : Run deno
19
- run : |
20
- git config --local user.email "2979986590@qq.com"
21
- git config --local user.name "webVueBlog"
22
- git remote set-url origin https://${{ github.actor }}:${{ secrets.AWESOME_CSS_TOKEN }}@github.com/${{ github.repository }}
23
- git pull
24
- set -e
25
- yarn build
26
- printf "打包成功\n"
27
- cd docs/.vuepress/dist
28
- git init
29
- git checkout -b dist
30
- git add -A
31
- git commit -m 'awesome-css github-pages'
32
- git push
33
- printf "提交成功\n"
23
+ - name : upload files
24
+ uses : actions/upload-artifact@v2
25
+ with :
26
+ name : build-pages
27
+ path : build
28
+ retention-days : 1
29
+ Deploy :
30
+ needs : Build
31
+ runs-on : ubuntu-latest
32
+ steps :
33
+ - name : checkout code
34
+ uses : actions/checkout@v2
35
+ - name : download build files
36
+ uses : actions/download-artifact@v2
37
+ with :
38
+ name : build-pages
39
+ path : build
40
+ - name : deploy
41
+ uses : JamesIves/github-pages-deploy-action@v4.2.3
42
+ with :
43
+ branch : dist
44
+ folder : dist
45
+ token : " ${{ secrets.AWESOME_CSS_TOKEN }}"
You can’t perform that action at this time.
0 commit comments