mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-28 16:51:26 +00:00
🐛 fix workflow vulnerability #79
This commit is contained in:
37
.github/workflows/build_docs.yml
vendored
Normal file
37
.github/workflows/build_docs.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
name: Build API Doc
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
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"
|
||||
|
||||
- name: Install Dependences
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install poetry
|
||||
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/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: docs
|
||||
path: docs/
|
Reference in New Issue
Block a user