generate new data #71
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: generate new data | |
on: | |
schedule: | |
- cron: '0 7 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: pip install pandas plotly==5.24.0 | |
- name: Run main script | |
env: | |
SOME_SECRET: ${{ secrets.TOKEN }} | |
run: | | |
python dump.py | |
python leaderboard.py | |
python legendaries.py | |
python update_csv.py | |
python make_plots.py | |
- name: Get current date | |
run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Commit and Push JSON | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Actions" | |
git add "files/Legendaries*.json" | |
git add "files/leaderboard.txt" | |
git add "data/*.json" | |
git add "data/*.xml" | |
git add "files/trades.csv" | |
git add "files/*.html" | |
git commit -m "(${{ env.NOW }}) Update" | |
git push | |
- name: push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.TOKEN }} | |
branch: main |