forked from thesadru/genshin-stats
-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (35 loc) · 1020 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: "Daily check and update"
on:
schedule:
- cron: "0 12 * * *"
workflow_dispatch:
jobs:
check_and_update:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install requirements
run: |
pip install git+https://github.com/thesadru/genshin.py
pip install -r requirements.txt
- name: Run main.py
env:
COOKIES: ${{ secrets.COOKIES }}
run: |
python main.py -o README.md
- name: Format with prettier
run: |
npx prettier README.md --write --parser html
- name: Commit and push if changed
run: |
git diff
git config --global user.name "Noël"
git config --global user.emai "[email protected]"
git add README.md codes.txt
git commit -m "Updated stats" || exit 0
git push