Skip to content

CRON: build data files #1691

CRON: build data files

CRON: build data files #1691

Workflow file for this run

name: "CRON: build data files"
on:
push:
schedule:
- cron: "10 14 * * *"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.13.2']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run main
run: python main.py
- name: Commit files
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Update data"
git push origin master
else
echo "No changes";
fi
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: data