1
0
mirror of https://github.com/one-among-us/data.git synced 2024-11-10 13:24:50 +08:00
one-among-us-data/.github/workflows/opencc.yml
2022-11-16 02:32:02 -05:00

45 lines
989 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: OpenCC Convert
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 20 # Fetch 20 recent commits
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- name: Install Python Dependencies
run: |
pip install -r requirements.txt
- name: Convert zh-hant
run: |
ls -lah
git log
python3 scripts/convert_zh.py
# If the hash is the only thing that's changed, don't commit
if [["$(git diff --numstat | wc -l)" == "1"]]
git reset hard
fi
- uses: EndBug/add-and-commit@v7
with:
default_author: github_actions
message: '[U] Generate zh_hant from zh_hans'