-
Notifications
You must be signed in to change notification settings - Fork 10
43 lines (41 loc) · 1.21 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Generate documentation
on:
push:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install poetry
run: |
pip install poetry
poetry --version
- name: Install dependencies and library
run: poetry install --no-root
- name: Generate documentation sources
run: |
poetry run sphinx-apidoc -f -o ./source ../scaleway-core
poetry run sphinx-apidoc -f -o ./source ../scaleway
poetry run sphinx-apidoc -f -o ./source ../scaleway-async
- name: Generate documentation
run: poetry run sphinx-build -b html ./ ./_build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: docs
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build
force_orphan: true