mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 14:17:49 +00:00
Update docs build in CI
This commit is contained in:
1 parent
ec41c32a0f
commit
6833044a85
2 files changed
+66
-47
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user