-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (43 loc) · 1.29 KB
/
main.yml
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
37
38
39
40
41
42
43
44
45
46
name: update
on:
schedule:
- cron: '30 5 * * *' #每日更新
watch:
types: [started]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest #运行环境
steps:
- name: Checkout
uses: actions/checkout@v2
- name: 'Git set'
run: |
git init
git pull
- name: 'Setup nodejs'
uses: actions/setup-node@v3
with:
node-version: 'latest'
- name: 'Install requirements'
run: |
npm install
- name: 'Working'
run: node program/fetchAll.js
- name: 'Create Files'
continue-on-error: True
run: node program/svg.js
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "Ravello-H"
git add -A
git commit -m "`date '+%Y-%m-%d %H:%M:%S'`" || exit #动态提交信息
git status
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}