-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (54 loc) · 2.09 KB
/
Copy pathAPI-Actions.yaml
File metadata and controls
57 lines (54 loc) · 2.09 KB
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
55
56
57
name: API On GitHub Actions
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: "10 2 * * *" # Runs every day at 2:10 AM UTC
jobs:
API:
runs-on: ubuntu-latest
steps:
- name: Checking out repo
uses: actions/checkout@v4
- name: Setting up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Installing package list
run: apt list --installed
# Need to fetch reqs if needed
- name: Installing all necessary packages
run: pip install -r requirements.txt
- name: Running Python1 (Get stock data from FindMind and save to CSV)
env:
FINDMIND_GMAIL_TOKEN: ${{ secrets.FINDMIND_GMAIL_TOKEN }}
run: |
python FindMind-fetch_and_save_stock_data.py >output.log 2>&1 || true
- name: Running Python2 (from CSV pick stock data by date)
run: |
python FindMind-read_stock_data_by_date.py >output2.log 2>&1 || true
- name: Running Python3 (check the missing date by holiday.csv to check complete or not)
run: |
python create_holiday.py >output3.log 2>&1 || true
- name: Running Python4,5,6 (from CSV pick Company features into `Features-Company.csv`)
run: |
python FindMind-read_PER_PBR.py >output4.log 2>&1 || true
python FindMind-read_company-profile.py >output5.log 2>&1 || true
python FindMind-read_dividend.py >output6.log 2>&1 || true
- name: Commit and Push The Results From Python Action
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add *.csv
git add *.log
git add auction_data_processed/*.csv
git add dividend/*.csv
git add company-profile/*.csv
git add PER_PBR/*.csv
git add financial/*.csv
git add stockdata/*.csv
git add TWSE_TPEX/*.csv
git commit -m "⬆️ GitHub Actions Results added" || true
git push || true