SyncStockShortData #454
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SyncStockShortData | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 10 * * *' | |
jobs: | |
build: | |
runs-on: macos-13 | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: browser-actions/setup-firefox@v1 | |
- run: firefox --version | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.12 | |
- name: Configure pip caching | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python dependencies | |
run: |- | |
python -m pip install -r ./requirements-finra_cron_job.txt | |
- name: Run sync stock short data | |
env: | |
AF_URL: ${{ secrets.AF_URL }} | |
AF_TOKEN: ${{ secrets.AF_TOKEN }} | |
run: |- | |
python ./finra_cron_job.py | |
- name: Checkout Norn-StockScreener | |
uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
repository: zmcx16/Norn-StockScreener | |
token: ${{ secrets.ACTIONS_TOKEN }} | |
path: ./Norn-StockScreener | |
fetch-depth: 0 | |
- name: Copy stock-short & push Norn-StockScreener | |
run: |- | |
rm -rf ./Norn-StockScreener/norn-data/stock-short | |
cp -r ./stock-short ./Norn-StockScreener/norn-data/ | |
cd ./Norn-StockScreener | |
git config --global user.name "zmcx16-bot" | |
git config --global user.email "zmcx16-bot@zmcx16.moe" | |
git reset --soft "gh-pages^" | |
git add ./norn-data/stock-short/\* && git commit -m "updated stock-short" | |
git push -f |