generate-page #5
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-page | |
on: | |
push: | |
paths: | |
- "data/data.csv" | |
- "templates/**" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Generate data.json | |
run: python utils.py | |
- name: Generate index.html | |
run: python main.py | |
- name: Commit changes | |
run: | | |
git config user.name "AyudaEnPython[bot]" | |
git config user.email "<>" | |
git add data/data.json index.html | |
git commit -m "Automated update of data.json and index.html" || echo "No changes to commit" | |
- name: Push changes | |
run: git push origin main |