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
43 changes: 43 additions & 0 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build Sphinx documentation

on:
# Run this workflow when documentation sources or this workflow definition change.
push:
branches: [main]
paths:
- "docs/**"
- "cosmos/**"
- ".github/workflows/docs-build.yml"
pull_request:
branches: [main]
paths:
- "docs/**"
- "cosmos/**"
- ".github/workflows/docs-build.yml"
Comment thread
pankajkoti marked this conversation as resolved.

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
persist-credentials: false

- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"

- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
Comment thread
pankajkoti marked this conversation as resolved.

- name: Build Sphinx documentation
run: sphinx-build -b html docs docs/_build --fail-on-warning --fresh-env
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
.github/ISSUE_TEMPLATE/*) ;;
.github/dependabot.yml) ;;
.github/workflows/docs.yml) ;;
.github/workflows/docs-build.yml) ;;
.github/workflows/stale.yml) ;;
.github/workflows/actionlint.yml) ;;
.github/workflows/codeql.yml) ;;
Expand Down
21 changes: 0 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,27 +100,6 @@ repos:
- id: blacken-docs
alias: black
additional_dependencies: [black>=26.3.1]
- repo: local
hooks:
- id: check-docs-build
name: Ensure the docs build without errors
entry: sphinx-build -b html docs docs/_build --fail-on-warning --fresh-env
language: python
additional_dependencies:
[
"aenum",
"deprecation",
"msgpack",
"apache-airflow",
"pydata-sphinx-theme>=0.16.0",
"sphinx",
"sphinx-autoapi",
"sphinx-autobuild",
"sphinx-reredirects",
"sphinxcontrib.mermaid",
]
pass_filenames: false
files: ^docs/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.20.0"
hooks:
Expand Down
Loading