Skip to content

Commit

Permalink
Docs CI build changes (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdye64 authored Feb 19, 2025
1 parent 3563d03 commit cbe293d
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 13 deletions.
44 changes: 31 additions & 13 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,55 @@ on:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: linux-large-disk
container:
image: ubuntu:latest
image: python:3.11-slim
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Install system deps
run: |
pip install --upgrade pip
apt-get update && apt-get install -y make
apt-get update && apt-get install -y make git
# Install dependencies from docs/requirements.txt
- name: Install mkdocs dependencies
run: |
pip install -r docs/requirements.txt
- name: Build Sphinx API Docs
run: |
cd docs/sphinx_docs
make html
cd ../../
mv docs/sphinx_docs/build/html docs/docs/user-guide/api_docs
# - name: Build Sphinx API Docs
# run: |
# cd docs/sphinx_docs
# make html
# cd ../../
# mv docs/sphinx_docs/build/html docs/docs/user-guide/api_docs

- name: Build MkDocs Site
run: mkdocs build --config-file docs/mkdocs.yml

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
- name: Upload Site Artifacts
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
path: ./docs/site

deploy:
needs:
- build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ mkdocs-include-dir-to-nav
mkdocs-literate-nav
mkdocs-site-urls
sphinx
sphinx-markdown-builder
sphinx-rtd-theme
2 changes: 2 additions & 0 deletions docs/sphinx_docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
pwd
ls -l
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1 change: 1 addition & 0 deletions docs/sphinx_docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys

sys.path.insert(0, os.path.abspath("../../../api/src")) # nv-ingest-api src
print(f"!!!!!sys.path: {sys.path}")

project = "nv-ingest"
copyright = "2025, Nvidia"
Expand Down

0 comments on commit cbe293d

Please sign in to comment.