chore: add support for ty and pyrefly (#1107) #2437
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate documentation | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./docs | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
cache: 'poetry' | |
- name: Set up cache | |
uses: actions/cache@v4 | |
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@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 |