genshin-wiki/.github/workflows/spider.yml

31 lines
799 B
YAML
Raw Normal View History

2023-08-21 12:54:36 +00:00
name: Genshin Data Spider
on:
schedule:
- cron: '0 4 */4 * *'
workflow_dispatch:
jobs:
spider:
runs-on: ubuntu-latest
name: "Scrape Genshin Data"
steps:
- name: Setup Python
uses: actions/setup-python@v4.7.0
with:
python-version: '3.11'
- name: Install Dependencies
run: |
2023-08-21 12:55:58 +00:00
python -m pip install --upgrade pip wheel setuptools
2023-08-21 12:54:36 +00:00
pip install --upgrade poetry
poetry install
- name: Run Spider
run: python -m run.py
- name: Commit and push
run: |-
git config --global user.email "bot@github.com" && git config --global user.name "Waka-Bot"
git diff
git add ./out && git commit -m ":memo: update profile" || exit 0
git pull && git push