Skip to content

Update & Deploy Game Data #20

Update & Deploy Game Data

Update & Deploy Game Data #20

Workflow file for this run

name: Update & Deploy Game Data
on:
schedule:
# UTC time for 10:30 & 16:10 (UTC+8)
- cron: "30 2 * * *"
- cron: "10 8 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Global permissions configuration starts here
permissions:
# 'write' access to repository contents
contents: write
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "update_pages"
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
environment:
name: github-pages
url: https://lengyanyu258.github.io/ArknightsWordCount/
steps:
- name: Cehckout root repo firstly.
uses: actions/checkout@v4
- name: Checkout ArknightsGameData Repo.
uses: actions/checkout@v4
with:
repository: "Kengxxiao/ArknightsGameData"
path: "Github/ArknightsGameData"
filter: "blob:none"
sparse-checkout: "zh_CN/gamedata/"
- name: Checkout ArknightsGameResource Repo.
uses: actions/checkout@v4
with:
repository: "yuanyan3060/ArknightsGameResource"
path: "Github/ArknightsGameResource"
filter: "blob:none"
sparse-checkout: "gamedata/"
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "poetry"
- run: poetry install
- name: Check if need to update
id: check_update
run: poetry run python main.py --all --test_update
- name: Proceed to Update & Commit to Deploy
if: ${{ github.event_name != 'schedule' || steps.check_update.outputs.test_update == 'true' }}
uses: ./.github/actions/auto-update