Skip to content

Commit

Permalink
updated generate documentation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
watakandai committed Jul 25, 2024
1 parent 3c8fa6a commit 4f06476
Showing 1 changed file with 37 additions and 6 deletions.
43 changes: 37 additions & 6 deletions .github/workflows/generate-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,53 @@ name: "Pull Request Docs Check"
on:
- pull_request


env:
os: ubuntu-latest
python-version: '3.10'
poetry-version: '1.8.3'
poetry-home: ''
poetry-path: ''
poetry-cache-paths: |
~/.local/share/pypoetry
~/.local/bin/poetry
poetry-cache-key-fmt: 'poetry-{0}-{1}-python-{2}'

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ env.os }}
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python3 -m pip install -r requirements.txt && python3 -m pip install -r docs/requirements.txt
python-version: ${{ env.python-version }}

- name: Set up Poetry ${{ env.poetry-version }}
id: setup-poetry
uses: ./.github/actions/setup-poetry
with:
cache-path: ${{ env.poetry-cache-paths }}
cache-key: ${{ format(env.poetry-cache-key-fmt, env.poetry-version, env.os, steps.setup-python.outputs.python-version) }}
poetry-version: ${{ env.poetry-version }}
poetry-home: ${{ env.poetry-home }}
poetry-path: ${{ env.poetry-path }}

- name: Set up Poetry dependencies
id: setup-poetry-dependencies
uses: ./.github/actions/setup-poetry-dependencies
with:
cache-key: ${{ format(env.venv-cache-key-fmt, env.os, steps.setup-python.outputs.python-version, hashFiles('**/poetry.lock')) }}
python-version: ${{ steps.setup-python.outputs.python-version }}
poetry-install-args: --no-interaction --with dev

- name: Sphinx build
run: |
python3 -m sphinx docs docs/build
${{ steps.setup-poetry-dependencies.outputs.venv-activate }}
python -m sphinx docs docs/build
# Great extra actions to compose with:
# Create an artifact of the html output.
- name: Upload artifacts
Expand Down

0 comments on commit 4f06476

Please sign in to comment.