Ship Web refresh cache/lock, mobile demand gate, matches 职业/国服 filter, and related site updates through 0.5.84. Co-authored-by: Cursor <cursoragent@cursor.com>
63 lines
2.0 KiB
YAML
63 lines
2.0 KiB
YAML
# Weekly Climperor web meta refresh (STRATZ + items) + deploy when changed.
|
|
# Repo secrets: STRATZ_API_TOKEN, CLOUDFLARE_EMAIL, CLOUDFLARE_API_KEY,
|
|
# OSS_ACCESS_KEY_ID, OSS_ACCESS_KEY_SECRET
|
|
|
|
name: web-weekly
|
|
|
|
on:
|
|
schedule:
|
|
# Tuesday 07:00 China = Monday 23:00 UTC
|
|
- cron: "0 23 * * 1"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: climperor-web-full-refresh
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
refresh:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Restore refresh cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: web/.refresh-cache
|
|
key: web-refresh-${{ runner.os }}-${{ hashFiles('web/data/patches.json') }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
web-refresh-${{ runner.os }}-${{ hashFiles('web/data/patches.json') }}-
|
|
web-refresh-${{ runner.os }}-
|
|
|
|
- name: Install deps
|
|
run: |
|
|
set -e
|
|
PYTHON=python3
|
|
command -v python3 >/dev/null || PYTHON=python
|
|
command -v node >/dev/null || { echo "node/npx required for wrangler deploy"; exit 1; }
|
|
"$PYTHON" -m pip install -q -r web/requirements.txt
|
|
|
|
- name: Refresh weekly tier
|
|
env:
|
|
REFRESH_CACHE_ENABLED: "1"
|
|
REFRESH_RUN_ID: ${{ github.run_id }}
|
|
STRATZ_API_TOKEN: ${{ secrets.STRATZ_API_TOKEN }}
|
|
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
|
|
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
|
|
OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }}
|
|
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
|
|
run: |
|
|
set -e
|
|
PYTHON=python3
|
|
command -v python3 >/dev/null || PYTHON=python
|
|
"$PYTHON" web/refresh_web.py --tier weekly
|
|
|
|
- name: Save refresh summary
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: web-weekly-refresh-${{ github.run_id }}
|
|
path: web/.refresh/summary.json
|
|
if-no-files-found: warn
|