Skip to content

更新部分内容

更新部分内容 #68

Workflow file for this run

name: Doc
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 12.18.2
- name: install gitbook
run: npm install gitbook-cli gitbook-summary -g
- name: set timezone
run: sudo ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- name: install
run: gitbook install
- name: clear README.md
run: echo "" > README.md
- name: generate-toc
run: book sm --disableTitleFormatting
- name: build
run: gitbook build
- name: install git
run: sudo apt-get install git -y
- name: publish
env:
ACCESS_TOKEN: ${{ secrets.AWESOME_PUBLISH_TOKEN }}
run: |
mkdir -p deploy-doc-dir
cd deploy-doc-dir
rm -rf *
git init
git config user.name "weiliang-ms"
git config user.email "[email protected]"
ls -R ../_book
mv ../_book docs
git add docs
git commit -m "Update docs"
git push --force "https://[email protected]/weiliang-ms/wl-awesome" master:docs