Skip to content

fix(ci): 添加 .nojekyll 避免 GitHub Pages Jekyll 处理 #5

fix(ci): 添加 .nojekyll 避免 GitHub Pages Jekyll 处理

fix(ci): 添加 .nojekyll 避免 GitHub Pages Jekyll 处理 #5

Workflow file for this run

name: 部署文档站
on:
push:
branches: [main, master]
paths: ['docs/**', 'package.json', '.github/workflows/deploy-docs.yml']
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: 安装依赖
run: npm ci
- name: 构建 VitePress
run: npm run docs:build
- name: 添加 .nojekyll
run: touch docs/.vitepress/dist/.nojekyll
- uses: actions/configure-pages@v5
with:
enablement: true
- uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- uses: actions/deploy-pages@v4