-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.09 KB
/
cht.yml
File metadata and controls
43 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Push to Traditional Chinese Repository
on:
push:
branches:
- master
jobs:
push:
if: github.repository == 'UTCLC/utclc.github.io'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Traditionalize
run: |
pip install opencc
python traditionalize.py
- name: Commit
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add .
git commit -m "Traditionalize"
- name: Push to repository
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
echo "GITHUB_TOKEN=${{ secrets.ACCESS_TOKEN }}" >> $GITHUB_ENV
git remote add target https://github.com/UTCLC/website_cht.git
git push target master --force