chore: update github action #49
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.yml | |
name: update docs | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout # 1. 将仓库内master分支的内容下载到工作目录 | |
uses: actions/checkout@v2 | |
- name: use Node.js 12.16.2 | |
uses: actions/setup-node@master | |
with: | |
node-version: 12.16.2 | |
- name: update docs | |
run: | | |
yarn | |
cd docs | |
yarn | |
yarn build | |
env: | |
CI: true | |
- name: deploy docs | |
uses: easingthemes/ssh-deploy@v2.1.5 | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.ACCESS_TOKEN }} | |
ARGS: '-avz --delete --exclude *.js.map' | |
SOURCE: 'docs/.docz/public/' | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
TARGET: ${{ secrets.DOCS_TARGET }} |