Files
cwd/.github/workflows/docs.yml
anghunk dea5dda044 ci(docs): 设置完整检出以支持VuePress部署
设置 actions/checkout 的 fetch-depth 为 0,确保检出完整的 Git 历史记录,这是 vuepress-deploy 操作正确生成页面版本信息所必需的。同时移除配置文件中无关的空行。
2026-01-23 20:28:54 +08:00

20 lines
495 B
YAML

name: Build and Deploy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: vuepress-deploy
uses: jenkey2011/vuepress-deploy@master
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
TARGET_REPO: anghunk/cwd
TARGET_BRANCH: gh-pages
BUILD_SCRIPT: yarn --cwd docs && yarn --cwd docs build
BUILD_DIR: docs/.vitepress/dist/