修正文档中的格式和内容
This commit is contained in:
61
.github/workflows/deploy.yml
vendored
61
.github/workflows/deploy.yml
vendored
@@ -1,61 +0,0 @@
|
||||
name: Deploy VitePress to GitHub Pages
|
||||
|
||||
on:
|
||||
# 每次推送到main分支时触发部署
|
||||
push:
|
||||
branches: [main]
|
||||
# 允许手动触发工作流
|
||||
workflow_dispatch:
|
||||
|
||||
# 设置GITHUB_TOKEN的权限
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# 只允许一个并发部署
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# 构建工作
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build with VitePress
|
||||
run: npm run docs:build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: docs/.vitepress/dist
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
- name: Refresh CDN Cache
|
||||
env:
|
||||
TENCENT_CLOUD_SECRET_ID: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
|
||||
TENCENT_CLOUD_SECRET_KEY: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
|
||||
TENCENT_CLOUD_ZONE_ID: ${{ secrets.TENCENT_CLOUD_ZONE_ID }}
|
||||
run: node scripts/cdn-fresh.mjs
|
||||
Reference in New Issue
Block a user