Skip to content

Commit c1afc1b

Browse files
authored
Update schedule.yml
1 parent 24ed32b commit c1afc1b

File tree

1 file changed

+34
-22
lines changed

1 file changed

+34
-22
lines changed

.github/workflows/schedule.yml

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,41 @@ on:
55
- cron: "*/1 * * * *"
66

77
jobs:
8-
build:
8+
Build:
99
runs-on: ubuntu-latest
10-
1110
steps:
12-
- name: Clone repository
13-
uses: actions/checkout@v2
1411

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
1722

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 }}"

0 commit comments

Comments
 (0)