-
Notifications
You must be signed in to change notification settings - Fork 247
50 lines (47 loc) · 1.66 KB
/
sphinx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# 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 pushes targeting the default branch
on:
push:
branches: [main]
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 -r docs/requirements.txt
- 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
git add . .nojekyll .buildinfo
git commit -m "Deploy Sphinx documentation"
git push -f origin gh-pages