Skip to content

generate data automatically #32309

generate data automatically

generate data automatically #32309

Workflow file for this run

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