Skip to content

Commit 5d5b736

Browse files
committed
Create deploy-chinese.yml
1 parent 61ab7c8 commit 5d5b736

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy Chinese
2+
3+
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# events but only for the master branch
5+
on:
6+
push:
7+
branches: [master]
8+
pull_request:
9+
branches: [master]
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
# This workflow contains a single job called "build"
14+
build:
15+
# The type of runner that the job will run on
16+
runs-on: macos-latest
17+
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
23+
# Checkout to chinese branch & Generate Chinese
24+
- name: Generate Chinese Readme
25+
run: |
26+
./generate-playground-cn.sh
27+
mv ./README-CN.md ./README.md
28+
29+
# Commit
30+
- name: Commit files
31+
run: |
32+
git config --local user.email "[email protected]"
33+
git config --local user.name "GitHub Action"
34+
git add README.md
35+
git commit -m "Generate Chinese version"
36+
## Push changes to chinese branch
37+
- name: Push changes
38+
uses: ad-m/github-push-action@master
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
branch: "chinese"
42+
force: true

0 commit comments

Comments
 (0)