Skip to content

docs: professional bilingual documentation restructuring v0.2.0 #6

docs: professional bilingual documentation restructuring v0.2.0

docs: professional bilingual documentation restructuring v0.2.0 #6

Workflow file for this run

name: Deploy Docs
on:
pull_request:
paths:
- "README.md"
- "README.zh-CN.md"
- "SUMMARY.md"
- "docs/**"
- "changelog/**"
- "book.json"
- "package.json"
- "package-lock.json"
- ".github/workflows/pages.yml"
push:
branches: [master, main]
paths:
- "README.md"
- "README.zh-CN.md"
- "SUMMARY.md"
- "docs/**"
- "changelog/**"
- "book.json"
- "package.json"
- "package-lock.json"
- ".github/workflows/pages.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
README.md
README.zh-CN.md
SUMMARY.md
book.json
package.json
package-lock.json
docs
changelog
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: package-lock.json
- name: Install docs dependencies
run: npm ci
- name: Build docs
run: npm run docs:build
- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v4
with:
path: _site
deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4