-
Notifications
You must be signed in to change notification settings - Fork 37
36 lines (36 loc) · 1.02 KB
/
generate.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: generate data automatically
on:
# push:
# Run workflow automatically
schedule:
# Runs every hour
# 每个小时 10 分执行,目的是为了和其他 crob 岔开时间,避免脚本执行一半其他 cron 推送了 origin 报错(报错:你需要先 git pull)。
- cron: "10 * * * *"
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
with:
token: ${{ secrets.CHECKOUT }}
submodules: "true"
- name: run npm
uses: actions/setup-node@v2
with:
node-version: "14"
- run: npm install
- name: generate data
env:
secret: ${{secrets.GENERATE}}
run: npm run generate
- name: Commit static
run: |
source ./scripts/commit.sh
- name: generate lectures
env:
secret: ${{secrets.GENERATE}}
run: npm run lecture
- name: Commit static
run: |
source ./scripts/commit.sh