Skip to content
/ API Public template

Update index.md

Update index.md #7

Workflow file for this run

name: Build and Deploy to Branch
on:
push:
branches: ["master"]
workflow_dispatch:
permissions:
contents: write # 允许向仓库推送代码
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: npm
- name: Install dependencies
run: npm install # 使用 install 代替 ci,避免 package-lock 冲突
- name: Build with VitePress
run: npm run docs:build
- name: Push to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist
publish_branch: gh-pages
force_orphan: true