Skip to content

Publish HTML

Publish HTML #126

Workflow file for this run

name: Publish HTML
on:
push:
branches:
- main
schedule:
- cron: "0 9 * * *" # This will run at 09:00 UTC every day (5:00 AM ET or 4:00 AM EST)
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Download latest card data
run: python card_aggregator.py download
- name: Update creature and land types
run: python card_aggregator.py update-types
- name: Run card aggregator
run: python card_aggregator.py run
- name: Flatten output directory
run: |
mkdir -p ./flattened_output
find ./data/output -type f -exec cp {} ./flattened_output \;
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.FINE_GRAINED_PAT }}
publish_dir: ./flattened_output
keep_files: false
- name: Archive card data
uses: actions/upload-artifact@v4
with:
name: card-data
path: ./data/downloads/*.json
retention-days: 7