3.0.15 #97
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
name: Build and Deploy Docs | |
on: | |
push: | |
branches: | |
- master | |
- v* | |
tags-ignore: | |
- v* | |
paths: | |
- .dumi/** | |
- docs/** | |
- src/** | |
- .umirc.js | |
- .github/** | |
- README.md | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install | |
run: pnpm install | |
- name: Test | |
run: pnpm test | |
- name: Build package | |
run: pnpm build | |
- name: Build latest docs | |
if: ${{github.ref == 'refs/heads/master'}} | |
run: pnpm run doc | |
- name: Deploy latest docs | |
if: ${{github.ref == 'refs/heads/master'}} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.ACCESS_TOKEN_WORKFLOW }} | |
publish_dir: site | |
destination_dir: latest | |
- name: Build version docs | |
if: ${{github.ref != 'refs/heads/master'}} | |
run: pnpm doc-version | |
- name: Deploy version docs | |
if: ${{github.ref != 'refs/heads/master'}} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.ACCESS_TOKEN_WORKFLOW }} | |
publish_dir: site | |
destination_dir: ${{github.ref}} |