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
28 changes: 27 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,38 @@ jobs:
uv run --no-project --python "$GITHUB_WORKSPACE/.artifact-venv" python -c "import bed_reader; assert '.artifact-venv' in bed_reader.__file__; print(bed_reader.__file__)"
uv run --no-project --python "$GITHUB_WORKSPACE/.artifact-venv" python -m pytest --import-mode=importlib --doctest-modules "$RUNNER_TEMP/bed_reader_artifact_tests"

docs:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install stable Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.12.24"
enable-cache: true
cache-suffix: documentation
- name: Install Rust
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # generic installer
with:
toolchain: stable
- name: Build bed-reader and install documentation dependencies
run: uv sync --frozen --all-extras
- name: Build documentation from clean sources
run: uv run --frozen --no-sync sphinx-build -W --keep-going -E -a -d "${{ runner.temp }}/doctrees" -b html doc/source "${{ runner.temp }}/generated-docs"

ci-result:
# The single required status check for branch protection. It runs even
# when other jobs fail, so a failure can never appear as a passing skip.
name: CI result
if: always()
needs: [test_rust, macos, linux, windows, sdist, merge_artifacts, test_python, artifact-test, sdist-test]
needs: [test_rust, macos, linux, windows, sdist, merge_artifacts, test_python, artifact-test, sdist-test, docs]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand Down
68 changes: 38 additions & 30 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,63 @@
name: Build and Deploy Documentation
name: Documentation deployment

on:
push:
branches:
- main
workflow_dispatch: # This allows manual triggering of the workflow
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: github-pages
cancel-in-progress: false

jobs:
build-and-deploy:
build:
name: Build documentation artifact
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write

steps:
- name: Checkout the code
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install stable Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.14"

- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.12.24"

enable-cache: true
cache-suffix: documentation
- name: Install Rust
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # generic installer
with:
toolchain: stable
components: rust-src

- name: Setup, Lint, and Test Python
run: |
uv sync --frozen --all-extras
source .venv/bin/activate
sphinx-build --version # Verify Sphinx is installed

- name: Build the Sphinx documentation
working-directory: ./doc
run: |
source ../.venv/bin/activate
make html SPHINXOPTS="-W --keep-going -E -a"

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4
- name: Build bed-reader and install documentation dependencies
run: uv sync --frozen --all-extras
- name: Build documentation from clean sources
run: uv run --frozen --no-sync sphinx-build -W --keep-going -E -a -d "${{ runner.temp }}/doctrees" -b html doc/source "${{ runner.temp }}/generated-docs"
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/build/html
path: ${{ runner.temp }}/generated-docs

deploy:
name: Deploy documentation
needs: build
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Configure GitHub Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Deploy uploaded artifact
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
4 changes: 0 additions & 4 deletions docs/.buildinfo

This file was deleted.

Loading
Loading