Skip to content
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
d52d738
Add docs versioning
sheikh-nv Oct 10, 2024
7db6374
Add newline
sheikh-nv Oct 10, 2024
d12ad61
Formatting
sheikh-nv Oct 10, 2024
b10b404
Merge pull request #1 from sheikh-nv/docs_versioning
sheikh-nv Oct 11, 2024
ed9e9f1
Update docs.yaml
sheikh-nv Oct 11, 2024
416caec
Update docs.yaml
sheikh-nv Oct 11, 2024
016b52f
remove tag whitelist
sheikh-nv Oct 11, 2024
339dfe5
Split branch and tags
sheikh-nv Oct 11, 2024
335d11f
Revert changes
sheikh-nv Oct 11, 2024
11e3ca8
do doc build
sheikh-nv Oct 11, 2024
52f42d6
remove smv_tag_whitelist
sheikh-nv Oct 11, 2024
2af4852
test sphinx metadata
sheikh-nv Oct 11, 2024
211734f
get references
sheikh-nv Oct 11, 2024
150d9b4
fetch tags
sheikh-nv Oct 11, 2024
ba68411
do docs build
sheikh-nv Oct 11, 2024
86ec3fe
add redirect from root
sheikh-nv Oct 11, 2024
fdc4014
ignore tags with v0
sheikh-nv Oct 11, 2024
54154da
Reduce versions header size
sheikh-nv Oct 11, 2024
5992eff
Merge branch 'isaac-sim:main' into main
sheikh-nv Oct 14, 2024
d63198b
Merge branch 'main' of https://github.com/sheikh-nv/IsaacLab
sheikh-nv Oct 16, 2024
ddbc8c7
move versions to top of side bar
sheikh-nv Oct 16, 2024
252b5a1
clean up for pull request
sheikh-nv Oct 16, 2024
cb97f18
Merge branch 'main' into main
Oct 17, 2024
dee0c11
Update docs.yaml
Oct 17, 2024
07dbf27
Update .github/workflows/docs.yaml
Oct 17, 2024
7ce3d1d
Update conf.py
Oct 17, 2024
2ac32c0
Update requirements.txt
Oct 17, 2024
c0cac72
Update .github/workflows/docs.yaml
Oct 17, 2024
2353242
Update make.bat
Oct 17, 2024
cafbd51
Update .github/workflows/docs.yaml
Oct 17, 2024
d823822
Update .github/workflows/docs.yaml
Oct 17, 2024
385d632
Update .github/workflows/docs.yaml
Oct 17, 2024
874ad84
Update docs/conf.py
Oct 17, 2024
391cbcb
Update .github/workflows/docs.yaml
Oct 17, 2024
26e8cb5
Update docs/conf.py
Oct 17, 2024
28136ba
Update docs/conf.py
Oct 17, 2024
211b326
Update docs/conf.py
Oct 17, 2024
142c955
Update docs/conf.py
Oct 17, 2024
26c6eb0
Update .github/workflows/docs.yaml
Oct 17, 2024
e82369b
Update .github/workflows/docs.yaml
Oct 17, 2024
7e26bda
Update .github/workflows/docs.yaml
Oct 17, 2024
f83fd5a
Update docs/conf.py
Oct 17, 2024
a72d1be
Update docs/conf.py
Oct 17, 2024
bcb7899
Update docs/conf.py
Oct 17, 2024
538b43c
Update .github/workflows/docs.yaml
Oct 17, 2024
e1c2d72
Update .github/workflows/docs.yaml
Oct 17, 2024
43d6c31
Update docs/conf.py
Oct 17, 2024
3df8d88
Update .github/workflows/docs.yaml
Oct 17, 2024
ee894ff
Update .github/workflows/docs.yaml
Oct 17, 2024
9e38c80
Update .github/workflows/docs.yaml
Oct 17, 2024
e80cfc3
Update docs/conf.py
Oct 17, 2024
2900814
Update docs/conf.py
Oct 17, 2024
1e88ca6
Update .github/workflows/docs.yaml
Oct 17, 2024
f6c5ef7
Update .github/workflows/docs.yaml
Oct 17, 2024
868df37
Update docs/conf.py
Oct 17, 2024
3ea4273
Update .github/workflows/docs.yaml
Oct 17, 2024
4f7f8ad
Update docs/conf.py
Oct 17, 2024
4a9ac41
Update docs/conf.py
Oct 17, 2024
4fdc8df
Update .github/workflows/docs.yaml
Oct 17, 2024
feac7f1
Update docs.yaml
Oct 17, 2024
e084ded
Update docs.yaml
Oct 17, 2024
1294b4a
Update docs.yaml
Oct 17, 2024
aa11f9b
Update docs.yaml
Oct 17, 2024
10b2095
Update docs/conf.py
Oct 17, 2024
ca541e1
Update docs.yaml
Oct 17, 2024
f21cbe0
Update .github/workflows/docs.yaml
Oct 17, 2024
c5306aa
Update docs.yaml
Oct 17, 2024
0a454d0
Update docs/_redirect/index.html
Oct 17, 2024
fa9efdf
Update docs/_redirect/index.html
Oct 17, 2024
7dabe8c
Update docs.yaml
Oct 17, 2024
4435121
Update Makefile
Oct 17, 2024
fa2951e
Update .github/workflows/docs.yaml
Oct 17, 2024
6a52b87
Update .github/workflows/docs.yaml
Oct 17, 2024
ba3ca0c
Update docs.yaml
Oct 18, 2024
86489cf
Update Makefile
Oct 18, 2024
36f6b7b
Update versioning.html
Oct 18, 2024
a34beda
Update make.bat
Oct 18, 2024
e0af2b6
Update docs.yaml
Oct 18, 2024
2ba6b72
Update README.md
Oct 18, 2024
b43760d
Update docs.yaml
Oct 18, 2024
5c2fa91
Update versioning.html
Oct 18, 2024
c2aa1d7
Update isaaclab.bat
Oct 18, 2024
f865fe5
Update isaaclab.sh
Oct 18, 2024
dc809b5
Update .github/workflows/docs.yaml
Oct 18, 2024
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
78 changes: 43 additions & 35 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,56 @@
name: Build & deploy docs

on: [push]
on:
push:
pull_request:

jobs:
build-docs:
name: Build Docs
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64

- name: Install dev requirements
working-directory: ./docs
run: pip install -r requirements.txt
- name: Install dev requirements
working-directory: ./docs
run: pip install -r requirements.txt

- name: Generate docs
working-directory: ./docs
run: make html
- name: Generate docs
working-directory: ./docs
run: |
git fetch --prune --unshallow --tags
git branch -r
echo exit code $?
git tag --list
make build
cp _redirect/index.html _build/index.html

- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: docs-html
path: ./docs/_build/html
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: docs-html
path: ./docs/_build

check-secrets:
name: Check secrets
runs-on: ubuntu-latest
outputs:
trigger-deploy: ${{ steps.trigger-deploy.outputs.defined }}
steps:
- id: trigger-deploy
env:
REPO_NAME: ${{ secrets.REPO_NAME }}
BRANCH_REF: ${{ secrets.BRANCH_REF }}
if: "${{ github.repository == env.REPO_NAME && github.ref == env.BRANCH_REF }}"
run: echo "defined=true" >> "$GITHUB_OUTPUT"
- id: trigger-deploy
env:
REPO_NAME: ${{ secrets.REPO_NAME }}
BRANCH_REF: ${{ secrets.BRANCH_REF }}
if: "${{ github.repository == env.REPO_NAME && github.ref == env.BRANCH_REF }}"
run: echo "defined=true" >> "$GITHUB_OUTPUT"

deploy-docs:
name: Deploy Docs
Expand All @@ -51,14 +59,14 @@ jobs:
if: needs.check-secrets.outputs.trigger-deploy == 'true'

steps:
- name: Download docs artifact
uses: actions/download-artifact@v4
with:
name: docs-html
path: ./docs/_build/html
- name: Download docs artifact
uses: actions/download-artifact@v4
with:
name: docs-html
path: ./docs/_build

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Guidelines for modifications:
* Mayank Mittal
* Nikita Rudin
* Pascal Roth
* Sheikh Dawood

## Contributors

Expand Down
10 changes: 2 additions & 8 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXBUILD ?= sphinx-multiversion
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
9 changes: 9 additions & 0 deletions docs/_redirect/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Redirecting to main branch</title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./main/index.html">
<link rel="canonical" href="https://isaac-sim.github.io/IsaacLab/main/index.html">
</head>
</html>
21 changes: 21 additions & 0 deletions docs/_templates/versioning.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% if versions %}
<nav class="bd-links bd-docs-nav">
<div class="bd-toc-item navbar-nav">
<ul class="nav bd-sidenav">
<li class="toctree-l1 has-children">
<p class="caption" aria-level="2" role="heading">
<span type="button" class="caption-text">Version: {{ current_version.name }}</span>
</p>
<ul>
{%- for item in versions.branches %}
<li class="toctree-l2 {% if item == current_version %}current{% endif %} "><a class="reference" href="{{item.url}}">{{item.name}}</a></li>
{%- endfor %}
{%- for item in versions.tags|reverse %}
<li class="toctree-l2 {% if item == current_version %}current{% endif %} "><a class="reference" href="{{item.url}}">{{item.name}}</a></li>
{%- endfor %}
</ul>
</li>
</ul>
</div>
</nav>
{% endif %}
22 changes: 18 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"sphinxcontrib.icon",
"sphinx_copybutton",
"sphinx_design",
"sphinx_tabs.tabs", # backwards compatibility for building docs on v1.0.0
"sphinx_multiversion",
]

# mathjax hacks
Expand Down Expand Up @@ -115,7 +117,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "README.md", "licenses/*"]
exclude_patterns = ["_build", "_redirect", "_templates", "Thumbs.db", ".DS_Store", "README.md", "licenses/*"]

# Mock out modules that are not available on RTD
autodoc_mock_imports = [
Expand Down Expand Up @@ -190,7 +192,7 @@

import sphinx_book_theme

html_title = "Isaac Lab documentation"
html_title = "Isaac Lab Documentation"
html_theme_path = [sphinx_book_theme.get_html_theme_path()]
html_theme = "sphinx_book_theme"
html_favicon = "source/_static/favicon.ico"
Expand All @@ -213,7 +215,7 @@
"show_toc_level": 1,
"use_sidenotes": True,
"logo": {
"text": "Isaac Lab documentation",
"text": "Isaac Lab Documentation",
"image_light": "source/_static/NVIDIA-logo-white.png",
"image_dark": "source/_static/NVIDIA-logo-black.png",
},
Expand All @@ -240,7 +242,19 @@
"icon_links_label": "Quick Links",
}

html_sidebars = {"**": ["navbar-logo.html", "icon-links.html", "search-field.html", "sbt-sidebar-nav.html"]}
templates_path = [
"_templates",
]

# Whitelist pattern for remotes
smv_remote_whitelist = r"^.*$"
# Whitelist pattern for branches (set to None to ignore all branches)
smv_branch_whitelist = os.getenv("SMV_BRANCH_WHITELIST", r"^(main|devel)$")
# Whitelist pattern for tags (set to None to ignore all tags)
smv_tag_whitelist = os.getenv("SMV_TAG_WHITELIST", r"^v[1-9]\d*\.\d+\.\d+$")
html_sidebars = {
"**": ["navbar-logo.html", "versioning.html", "icon-links.html", "search-field.html", "sbt-sidebar-nav.html"]
}


# -- Advanced configuration -------------------------------------------------
Expand Down
25 changes: 25 additions & 0 deletions docs/licenses/dependencies/sphinx-multiversion-license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
BSD 2-Clause License

Copyright (c) 2020, Jan Holthuis <[email protected]>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 changes: 4 additions & 9 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,26 @@ pushd %~dp0
REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
set SPHINXBUILD=sphinx-multiversion
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.The 'sphinx-multiversion' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.to the full path of the 'sphinx-multiversion' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
%SPHINXBUILD% %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ sphinx-copybutton
sphinx-icon
sphinx_design
sphinxemoji
sphinx-tabs # backwards compatibility for building docs on v1.0.0
sphinx-multiversion==0.2.4

# basic python
numpy
Expand Down
Loading