2023-05-15 21:47:01 +08:00
|
|
|
name: Deploy
|
|
|
|
on:
|
|
|
|
workflow_dispatch: {}
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [20]
|
|
|
|
permissions:
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install dependencies
|
|
|
|
working-directory: docs
|
|
|
|
run: pnpm install --frozen-lockfile=false
|
|
|
|
- name: Build
|
|
|
|
working-directory: docs
|
|
|
|
run: pnpm run docs:build
|
|
|
|
- uses: actions/configure-pages@v2
|
|
|
|
- uses: actions/upload-pages-artifact@v1
|
|
|
|
with:
|
|
|
|
path: docs/.vitepress/dist
|
|
|
|
- name: Deploy
|
|
|
|
id: deployment
|
2023-05-15 21:55:52 +08:00
|
|
|
uses: actions/deploy-pages@v2
|