Update mediaworks #63
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: Ensure book types are up to date | |
on: [push] | |
jobs: | |
scrape_book_types: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Install Python deps | |
run: pip install -e . | |
- name: Scrape book types | |
run: | | |
python scrape_book_types.py > book_types.py.new | |
mv book_types.py.new src/HexBug/utils/book_types.py | |
ruff format src/HexBug/utils/book_types.py | |
ruff check --select=I --fix src/HexBug/utils/book_types.py | |
- name: Commit updated book types | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update book types | |
- name: Dump patterns | |
run: python dump_patterns.py patterns.csv.new | |
- name: Check out gh-pages | |
uses: actions/checkout@v3 | |
with: | |
clean: false | |
ref: gh-pages | |
- name: Overwrite file | |
run: mv patterns.csv.new patterns.csv | |
- name: Commit updated pattern dump | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update pattern dump | |
file_pattern: patterns.csv |