chore: update qr code #366
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
# 当main有代码提交或者有pr时,自动build gitbook,并覆盖[email protected]:zeromicro/go-zero-pages.git仓库中内容 | |
# 以实现自动发布文档 | |
name: Document Build | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v2 | |
- name: chmod contributor tool | |
run: chmod +x ${{ github.workspace }}/.github/workflows/contributor-tool | |
- name: get latest contributors(cn) | |
run: ${{ github.workspace }}/.github/workflows/contributor-tool -f contributor -l zh -o ${{ github.workspace }}/go-zero.dev/cn/contributor.md | |
- name: get latest contributors(en) | |
run: ${{ github.workspace }}/.github/workflows/contributor-tool -f contributor -l en -o ${{ github.workspace }}/go-zero.dev/en/contributor.md | |
- name: use node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12.18.1' | |
- name: install gitbook | |
run: npm install gitbook-cli -g | |
- name: gitbook version | |
run: gitbook --version | |
- name: gitbook install | |
run: cd ${{ github.workspace }}/go-zero.dev && gitbook install | |
- name: build | |
run: cd ${{ github.workspace }}/go-zero.dev && gitbook build | |
- name: delete original index | |
run: rm -f ${{ github.workspace }}/go-zero.dev/_book/index.html | |
- name: build index | |
run: ${{ github.workspace }}/.github/workflows/contributor-tool -i ${{ github.workspace }}/go-zero.dev/_book/index.html | |
- name: chmod | |
run: chmod +x ${{ github.workspace }}/.github/workflows/build.sh | |
- name: publish | |
run: ${{ github.workspace }}/.github/workflows/build.sh ${{ secrets.ACCESSTOKEN }} | |
shell: bash |