Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,33 @@ on:
jobs:
docs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install dependencies
run: pip install sphinx
- name: Sphinx build
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install poetry
run: |
pip install poetry
poetry --version
- name: Install dependencies and library
run: poetry install --no-root
- name: Generate documentation sources
run: |
sphinx-apidoc -o docs scaleway
sphinx-build -b html docs _build
- name: Deploy
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@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: docs
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
publish_dir: ./docs/_build
force_orphan: true
8 changes: 0 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ on:
types: ["opened", "edited", "reopened", "synchronize"]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v3

tests:
runs-on: ubuntu-latest
strategy:
Expand Down
11 changes: 8 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["sphinx.ext.autodoc"]
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx_rtd_theme",
]
autosummary_generate = True

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
Expand All @@ -26,7 +31,7 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath(".."))
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Welcome to Scaleway Python SDK's documentation!
:maxdepth: 2
:caption: Contents:

scaleway-core
scaleway
scaleway-async



Indices and tables
Expand Down
Loading