-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.25 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
47
48
49
50
51
52
53
54
name: 'new-stock-calender-in-china-market'
on:
schedule:
- cron: '26,56 * * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout from repo
uses: actions/checkout@main
with:
ref: main
- name: Checkout private tools
uses: actions/checkout@main
with:
repository: zning1994/new-stock-calender-scripts
branch: main
token: ${{ secrets.PRIVATE_TOEKEN }}
path: scripts
- name: Install Python latest
uses: actions/setup-python@main
with:
python-version: '3.x'
architecture: 'x64'
- name: Install dependencies
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Doing fetch and convert
run: |
cd scripts;
python Generate_New_Stocks.py;
mv index.html ../;
mv data ../;
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "ZNing"
git add .
git commit -m "提交新股日历更新 $(date "+%Y-%m-%d %H:%M:%S")"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main