nonebot2/.github/workflows/build_docs.yml

45 lines
994 B
YAML
Raw Normal View History

name: Build API Doc
on:
2020-11-26 12:18:36 +00:00
pull_request:
2020-09-13 14:32:55 +00:00
types: [ opened, synchronize, reopened ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: "x64"
- uses: Gr1N/setup-poetry@v4
- uses: actions/cache@v1
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Set up dependencies
run: |
poetry install
- name: Build Doc
run: poetry run sphinx-build -M markdown ./docs_build ./build
- name: Copy Files
run: cp -r ./build/markdown/* ./docs/api/
2020-11-26 12:18:36 +00:00
- uses: actions/upload-artifact@v2
with:
name: docs
path: docs/