Skip to content

Commit 65575cf

Browse files
committed
Add config file and doc building job
1 parent 0de920f commit 65575cf

File tree

3 files changed

+74
-9
lines changed

3 files changed

+74
-9
lines changed

.github/workflows/sphinx_build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: "Build documentation"
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- ros2
9+
schedule:
10+
- cron: '38 2 * * *'
11+
12+
jobs:
13+
docs:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
steps:
20+
- uses: actions/checkout@v5
21+
- uses: actions/setup-python@v6
22+
with:
23+
cache: 'pip'
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r doc_requirements.txt
28+
- name: Build documentation
29+
run: |
30+
sphinx-build -W -b html ur_simulation_gz/doc _doc_build

doc_requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sphinx
2+
sphinx-copybutton
3+
sphinx-tabs
4+
sphinx_rtd_theme
5+
catkin-pkg

ur_simulation_gz/doc/conf.py

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
#!/usr/bin/env python
2+
# Copyright 2025, Universal Robots A/S
3+
#
4+
# Redistribution and use in source and binary forms, with or without
5+
# modification, are permitted provided that the following conditions are met:
6+
#
7+
# * Redistributions of source code must retain the above copyright
8+
# notice, this list of conditions and the following disclaimer.
9+
#
10+
# * Redistributions in binary form must reproduce the above copyright
11+
# notice, this list of conditions and the following disclaimer in the
12+
# documentation and/or other materials provided with the distribution.
13+
#
14+
# * Neither the name of the {copyright_holder} nor the names of its
15+
# contributors may be used to endorse or promote products derived from
16+
# this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28+
# POSSIBILITY OF SUCH DAMAGE.
29+
30+
131
# Configuration file for the Sphinx documentation builder.
232
#
333
# For the full list of built-in configuration values, see the documentation:
@@ -6,28 +36,28 @@
636
# -- Project information -----------------------------------------------------
737
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
838

9-
project = 'ur_simulation_gz'
10-
copyright = '2025, Felix Exner'
11-
author = 'Felix Exner'
39+
project = "ur_simulation_gz"
40+
copyright = "2025, Felix Exner"
41+
author = "Felix Exner"
1242

1343
# -- General configuration ---------------------------------------------------
1444
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1545

1646
extensions = []
1747

18-
templates_path = ['_templates']
19-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
48+
templates_path = ["_templates"]
49+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
2050

21-
root_doc = 'index'
51+
root_doc = "index"
2252

2353

2454
# -- Options for HTML output -------------------------------------------------
2555
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
2656

27-
html_theme = 'alabaster'
28-
html_static_path = ['_static']
57+
html_theme = "alabaster"
58+
html_static_path = ["_static"]
2959

3060
# -- Options for HTMLHelp output ---------------------------------------------
3161

3262
# Output file base name for HTML help builder.
33-
htmlhelp_basename = "ur_simulation_gz_doc"
63+
htmlhelp_basename = "ur_simulation_gz_doc"

0 commit comments

Comments
 (0)