Files
cwd/.github/workflows/docs.yml
anghunk 615589f86b ci: 限制工作流仅在主仓库执行
为 npm 发布、文档构建与部署以及创建发布的工作流添加条件执行。
现在这些工作流仅会在 'anghunk/cwd' 仓库中运行,防止在复刻仓库上意外触发。
2026-02-04 14:02:58 +08:00

21 lines
543 B
YAML

name: Build and Deploy Docs
on: [push]
jobs:
build-and-deploy:
if: github.repository == 'anghunk/cwd'
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/