2022-11-16 15:20:58 +08:00
|
|
|
name: OpenCC Convert
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2022-11-16 15:27:41 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 20 # Fetch 20 recent commits
|
2022-11-16 15:20:58 +08:00
|
|
|
|
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.11'
|
2022-11-16 15:27:41 +08:00
|
|
|
cache: 'pip' # caching pip dependencies
|
2022-11-16 15:20:58 +08:00
|
|
|
|
|
|
|
- name: Install Python Dependencies
|
2022-11-16 15:24:22 +08:00
|
|
|
run: |
|
|
|
|
pip install -r requirements.txt
|
2022-11-16 15:20:58 +08:00
|
|
|
|
|
|
|
- name: Convert zh-hant
|
2022-11-16 15:24:22 +08:00
|
|
|
run: |
|
|
|
|
ls -lah
|
2022-11-16 15:25:55 +08:00
|
|
|
git log
|
2022-11-16 15:24:22 +08:00
|
|
|
python3 scripts/convert_zh.py
|
2022-11-16 15:20:58 +08:00
|
|
|
|
|
|
|
- uses: EndBug/add-and-commit@v7
|
|
|
|
with:
|
|
|
|
default_author: github_actions
|
|
|
|
message: '[U] Generate zh_hant from zh_hans'
|
|
|
|
|
|
|
|
|