Daily check and update #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Daily check and update" | |
on: | |
schedule: | |
- cron: "0 1 * * *" | |
workflow_dispatch: | |
jobs: | |
check_and_update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v3 | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.10.11 | |
- 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 user.name "5idereal" | |
git config user.email "[email protected]" | |
git add . | |
git commit -m "update" | |
git push |