-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.31 KB
/
publish_html.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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@v2
- name: Set up Python
uses: actions/setup-python@v2
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@v3
with:
personal_token: ${{ secrets.FINE_GRAINED_PAT }}
publish_dir: ./flattened_output
keep_files: false
- name: Archive card data
uses: actions/upload-artifact@v2
with:
name: card-data
path: ./data/*.json
retention-days: 7