Commit 128b60bf2662b44870077b229b08a8835559f4fa
Committed by
GitHub
1 parent
eb5edb10
chore: use github actions to build&deloy docs
Showing
1 changed file
with
32 additions
and
0 deletions
.github/workflows/deploy-docs.yml
0 → 100644
| 1 | +name: Build&Deploy Document | ||
| 2 | +# This workflow is triggered on pushes to the repository. | ||
| 3 | +on: | ||
| 4 | + push: | ||
| 5 | + branches: | ||
| 6 | + - dev | ||
| 7 | + paths: | ||
| 8 | + - 'docs/**/**' | ||
| 9 | + | ||
| 10 | +jobs: | ||
| 11 | + build-deploy: | ||
| 12 | + runs-on: ubuntu-18.04 | ||
| 13 | + steps: | ||
| 14 | + - uses: actions/checkout@master | ||
| 15 | + with: | ||
| 16 | + ref: dev | ||
| 17 | + | ||
| 18 | + - name: build | ||
| 19 | + uses: actions/setup-node@v1 | ||
| 20 | + with: | ||
| 21 | + node-version: '10.x' | ||
| 22 | + - run: | | ||
| 23 | + cd docs | ||
| 24 | + npm install | ||
| 25 | + npm run docs:build | ||
| 26 | + | ||
| 27 | + - name: deploy | ||
| 28 | + uses: peaceiris/actions-gh-pages@v2.5.0 | ||
| 29 | + env: | ||
| 30 | + ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | ||
| 31 | + PUBLISH_BRANCH: gh-pages | ||
| 32 | + PUBLISH_DIR: ./docs/.vuepress/dist |