diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 00000000..e74752d5 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,66 @@ +name: Docs Build + +on: + push: + # TODO change branch to main once docs is merged + branches: [ docs ] + # Manual trigger, as you have — you can also add "push" later if desired + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 # give yourself more headroom for builds + + steps: + - name: Checkout + uses: actions/checkout@v4 # use latest v4 instead of v3 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Install uv + run: pip install uv + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/uv + key: uv-${{ hashFiles('pyproject.toml') }} + + - name: Install dependencies + run: | + uv venv + uv pip install -e ".[dev]" + + - name: Build docs + run: uv run poe doc-build + # TODO: change once errors are resolved + continue-on-error: true + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs/_build # ✅ confirm this is your static HTML output directory + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/lint_and_docs.yaml b/.github/workflows/lint_and_docs.yaml deleted file mode 100644 index daef60c8..00000000 --- a/.github/workflows/lint_and_docs.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: Linting, Types and Docs Check - -on: - workflow_dispatch: # Manual trigger only - workflow disabled from auto-running - -jobs: - check: - runs-on: ubuntu-latest - timeout-minutes: 5 - permissions: - id-token: write - pages: write - actions: write - contents: read - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - # use uv package manager - - name: Install uv - run: pip install uv - - uses: actions/cache@v3 - name: Cache dependencies - with: - path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} - - name: Install dependencies - run: | - uv venv - uv pip install -e ".[dev]" - - name: Lint - run: uv run poe lint - - name: Types - run: uv run poe type-check - - name: Docs - run: uv run poe doc-build - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: "docs/_build" - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file