Skip to content

Fix link not found issue: GENERATE.md -> CONTRIBUTING.md #9

Fix link not found issue: GENERATE.md -> CONTRIBUTING.md

Fix link not found issue: GENERATE.md -> CONTRIBUTING.md #9

name: Generate Playground Files and READMES
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
generate-playgrounds:
# The type of runner that the job will run on
runs-on: macos-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Checkout & Generate
- name: Generate playgrounds and readmes
run: |
./generate-playground.sh
./generate-playground-cn.sh
# Commit
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add Design-Patterns-CN.playground.zip
git add Design-Patterns.playground.zip
git add README.md
git add README-CN.md
git commit -m "Generate Playground"
## Push changes to master branch
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: "master"
force: false
# This workflow contains a single job called "build"
generate-chinese-branch:
needs: generate-playgrounds
# The type of runner that the job will run on
runs-on: macos-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Checkout & Generate
- name: Generate Chinese Readme
run: |
./generate-playground-cn.sh
mv ./README-CN.md ./README.md
# Commit
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "Generate Chinese version"
## Push changes to chinese branch
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: "chinese"
force: true