Deploy Sphinx documentation to Pages #22
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
# Copyright (c) 2024 NVIDIA CORPORATION. All rights reserved. | |
# NVIDIA CORPORATION and its licensors retain all intellectual property | |
# and proprietary rights in and to this software, related documentation | |
# and any modifications thereto. Any use, reproduction, disclosure or | |
# distribution of this software and related documentation without an express | |
# license agreement from NVIDIA CORPORATION is strictly prohibited. | |
name: Deploy Sphinx documentation to Pages | |
# Runs on every tag created beginning with the character v | |
on: | |
push: | |
tags: | |
- v* | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --no-cache-dir -r docs/requirements.txt | |
- name: Build Warp without CUDA Support | |
run: python build_lib.py | |
- name: Build Sphinx documentation | |
run: python build_docs.py | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-docs | |
path: docs/_build/html/ | |
- name: Deploy to gh-pages | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git checkout --orphan gh-pages | |
git rm -rf . | |
mv docs/_build/html/* . | |
mv docs/_build/html/.nojekyll . | |
mv docs/_build/html/.buildinfo . | |
rm -rf docs warp _build __pycache__ | |
git add . .nojekyll .buildinfo | |
git commit -m "Deploy Sphinx documentation" | |
git push -f origin gh-pages |