Skip to content

docs: 更新文档 #202

docs: 更新文档

docs: 更新文档 #202

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@v3
- uses: pdm-project/setup-pdm@v3
name: Setup PDM
with:
python-version: 3.9
cache: true
- name: Install dependencies
run: pdm install -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
env:
ALICEBOT_DEV: "1"
- uses: pnpm/action-setup@v2
with:
version: ^6.10.0
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "pnpm"
- run: pnpm install
shell: bash
- name: Build VuePress site
run: pnpm docs:build
- uses: actions/upload-pages-artifact@v1
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@v1