Skip to content

Merge pull request #288 from MeanZhang/dependabot/npm_and_yarn/vite-5… #5

Merge pull request #288 from MeanZhang/dependabot/npm_and_yarn/vite-5…

Merge pull request #288 from MeanZhang/dependabot/npm_and_yarn/vite-5… #5

Workflow file for this run

name: 部署文档
on:
push:
branches: [main]
paths:
- "docs/**"
- "package.json"
- "yarn.lock"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: yarn
- name: Setup Pages
uses: actions/configure-pages@v5
- name: 安装依赖
run: yarn
- name: 生成文档
run: yarn docs:build --base /Traclock/
- name: 上传产物
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: 部署
id: deployment
uses: actions/deploy-pages@v4