mirror of
https://github.com/PaiGramTeam/genshin-wiki.git
synced 2024-11-25 01:21:57 +00:00
✨ add GitHub action
This commit is contained in:
parent
d4c4203a46
commit
e9f14385f1
31
.github/workflows/spider.yml
vendored
Normal file
31
.github/workflows/spider.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
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'
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip wheel setuptools
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user