Skip to content

Gotta Catch 'Em All #53

Gotta Catch 'Em All

Gotta Catch 'Em All #53

Workflow file for this run

name: Gotta Catch 'Em All
on:
schedule:
- cron: "0 0 1 */6 *"
jobs:
build:
name: Action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- run: python data/scripts/pokemon.py
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "Api Updater"
git add .
git diff-index --quiet HEAD || git commit -m "(╯°□°)╯︵◓" -a
git push
- name: Remove Old Files
uses: actions/checkout@v2
with:
ref: gh-pages
- run: |
if [ -d data/img/pokemon ]; then rm -R data/img/pokemon; git commit -am "Removed Old Pokemon Items"; git push; fi
- uses: actions/checkout@v2
with:
ref: master
- run: python data/scripts/pokemonImages.py
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "I caught a Pokemon!"
branch: gh-pages
commit_user_name: Api Updater
commit_user_email: [email protected]
commit_author: Api Updater <[email protected]>