From 4c19a00b66ff34eb7efaafbe15e1d2a16fe95954 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 10 Jun 2023 22:35:27 +0800 Subject: [PATCH] Support auto update oversea codes --- .github/workflows/daily.yml | 47 +++++++ data/code.html | 9 +- data/code.json | 214 +------------------------------- data/css/bootstrap.min.css | 7 ++ data/custom.json | 13 +- data/js/bootstrap.bundle.min.js | 7 ++ 6 files changed, 67 insertions(+), 230 deletions(-) create mode 100644 .github/workflows/daily.yml create mode 100644 data/css/bootstrap.min.css create mode 100644 data/js/bootstrap.bundle.min.js diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml new file mode 100644 index 0000000..b6daa95 --- /dev/null +++ b/.github/workflows/daily.yml @@ -0,0 +1,47 @@ +name: Auto update oversea codes + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: ~ + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + # 此步骤使用 GitHub 的 https://github.com/actions/checkout + - name: checkout actions + uses: actions/checkout@v3 + + # 设置python环境 + # 此步骤使用 GitHub 的 https://github.com/actions/setup-python + - name: Set up Python 3.9 + uses: actions/setup-python@v3 + with: + python-version: 3.9 + + # 安装依赖 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + # 更新国际服 code + - name: Update over code + run: | + python main.py + + # Auto commit + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + author_name: github-actions[bot] + author_email: github-actions[bot]@users.noreply.github.com + push: 'origin remote --force' + new_branch: 'remote' + message: ':sparkles: Update Codes' + add: | + 'data' diff --git a/data/code.html b/data/code.html index f614781..055de09 100644 --- a/data/code.html +++ b/data/code.html @@ -3,13 +3,10 @@ - Dark Responsive Page with Tabs + 《崩坏:星穹铁道》兑换码 - PaiGramTeam - - - - - + +