Skip to content

docs: 更新文档 #254

docs: 更新文档

docs: 更新文档 #254

Workflow file for this run

name: Docs Web Site Deploy
on:
push:
branches:
- master
paths-ignore:
- 'examples/**'
pull_request:
paths-ignore:
- 'examples/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v4
name: Setup PDM
with:
python-version: 3.9
cache: true
- name: Install dependencies
run: pdm install --no-editable -G dev -G docs
- name: Build API Doc
run: pdm run sophia-doc alicebot -o docs/dev-api --anchor-extend --ignore-data --overwrite --exclude-module-name --init-file-name index.md
shell: bash
- uses: pnpm/action-setup@v3
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: latest
cache: pnpm
- run: pnpm install
shell: bash
- name: Build VitePress site
run: pnpm run docs:build
- uses: actions/upload-pages-artifact@v3
if: github.event_name != 'pull_request'
with:
path: docs/.vitepress/dist
deploy:
needs: build
if: github.event_name != 'pull_request'
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4