Translate original/messages.json in zh_TW #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sync-locale | |
on: | |
push: | |
branches: | |
- sync-locale | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
locale: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Format output | |
run: node ./locales.js | |
- name: Checkout dev branch | |
uses: actions/checkout@v3 | |
with: | |
ref: 'dev' | |
path: '_dev_' | |
- name: Copy new locale | |
run: | | |
rm -rf ./_dev_/public/_locales | |
cp -r ./output ./_dev_/public/_locales | |
- name: Deploy to dev-locale | |
run: | | |
cd ./_dev_ | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
GIT_STATUS=$(git status --porcelain) | |
if [[ $GIT_STATUS != "" ]]; then | |
git add --all . | |
git commit -m '[skip ci] sync locale' --quiet --no-verify | |
else | |
echo "no content, skip commit" | |
fi | |
git push --force origin dev:dev-locale | |
- name: Create PR | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm i axios | |
node ./create-pr.js |