Docs CI build changes #381
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build NV-Ingest Documentation | |
# Trigger for pull requests and pushing to main | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write # gotta have this to push to gh-pages branch | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: linux-large-disk | |
container: | |
image: python:3.11-slim | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install system deps | |
run: | | |
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 MkDocs Site | |
run: mkdocs build --config-file docs/mkdocs.yml | |
- name: Upload Site Artifacts | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs/site | |
deploy: | |
needs: | |
- build | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
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 |