mirror of
https://github.com/PaiGramTeam/genshin-wiki.git
synced 2024-11-24 17:19:26 +00:00
35 lines
914 B
YAML
35 lines
914 B
YAML
name: Genshin Data Spider
|
|
on:
|
|
schedule:
|
|
- cron: '0 4 */4 * *'
|
|
workflow_dispatch:
|
|
jobs:
|
|
spider:
|
|
runs-on: ubuntu-latest
|
|
name: "Scrape Genshin Data"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3.5.3
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4.7.0
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip wheel setuptools
|
|
pip install --upgrade poetry
|
|
poetry config virtualenvs.create false
|
|
poetry install
|
|
|
|
- name: Run Spider
|
|
run: python run.py
|
|
|
|
- name: Commit and push
|
|
run: |-
|
|
git config --global user.email "bot@github.com" && git config --global user.name "Github-Bot"
|
|
git diff
|
|
git add ./out && git commit -m ":memo: update genshin data" || exit 0
|
|
git pull && git push
|