Skip to content

docs: 规范文档信息架构并调整 CI 为仅格式检查 #2

docs: 规范文档信息架构并调整 CI 为仅格式检查

docs: 规范文档信息架构并调整 CI 为仅格式检查 #2

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [master, main]
paths:
- 'index.md'
- 'docs/**'
- 'changelog/**'
- '_config.yml'
- 'README.md'
- 'README.zh-CN.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- '.github/workflows/pages.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build Pages
runs-on: ubuntu-latest
steps:
- name: Checkout (sparse — skip source code)
uses: actions/checkout@v4
with:
sparse-checkout-cone-mode: false
sparse-checkout: |
index.md
_config.yml
README.md
README.zh-CN.md
CONTRIBUTING.md
LICENSE
docs/
changelog/
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
name: Deploy Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4