Skip to content

Commit

Permalink
Joy's Genshin Impact stats
Browse files Browse the repository at this point in the history
Signed-off-by: MhankBarBar <[email protected]>
  • Loading branch information
MhankBarBar committed Jun 17, 2023
0 parents commit 1b7f7fe
Show file tree
Hide file tree
Showing 7 changed files with 6,056 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Daily check and update"

on:
schedule:
- cron: "0 */6 * * *"
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 checkout --orphan temp_branch
git config user.name "MhankBarBar"
git config user.email "[email protected]"
git add -A
git commit -asm "Joy's Genshin Impact stats"
git branch -D master
git branch -m master
git push -f origin master
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# PyCharm/IntelliJ-generated files
*.iml
.idea/

# Visual Studio Code-generated files
.settings/
.project
.vscode/
.vs/

# Environments
*.env
.venv
env/
venv/

# mypy
.mypy_cache/
.dmypy.json
dmypy.json


# main content
stats.html
README_TEST.md
Loading

0 comments on commit 1b7f7fe

Please sign in to comment.