ci: update

This commit is contained in:
ZiuChen 2022-07-26 10:55:44 +08:00
parent 20316e14e1
commit c6d4482fd7

View File

@ -2,11 +2,11 @@
name: Build and deploy
# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@ -26,14 +26,25 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "16"
node-version: '16'
- name: Install pnpm
uses: pnpm/action-setup@v2.2.2
id: pnpm-install
with:
version: 7
run_install: false
- name: Install dependencies
run: pnpm
run: pnpm install
- name: Build VuePress site
run: pnpm docs:build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
env:
REPO: git@github.com:owner/repo.git
BRANCH: gh-pages
FOLDER: docs/.vuepress/dist
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }}