-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (45 loc) · 1.52 KB
/
docs.yml
File metadata and controls
47 lines (45 loc) · 1.52 KB
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
44
45
46
47
name: Generate documentation
permissions:
contents: read
on:
push:
branches:
- main
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.13"
cache: 'poetry'
- name: Set up cache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ./source
key: 'sphinx-source-cache'
- 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 -j auto -b html ./ ./_build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
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