Skip to content

Commit

Permalink
feat(Github Actions): build and deploy documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianDue committed Nov 29, 2024
1 parent 6902442 commit dacc616
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build_and_deploy_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and deploy documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
build-and-deploy-documentation:
name: Build and Deploy Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Build and deploy documentation
run: |
sphinx-build -M html documentation/source documentation/build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push'}}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: documentation/build/html
force_orphan: true
publish_branch: gh-pages

2 changes: 1 addition & 1 deletion .github/workflows/coverage_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ jobs:
registry_module_synchronization.c

token: ${{ secrets.CODECOV_TOKEN }}
slug: FlorianDue/check_server_template
slug: FlorianDue/check_registry_module
18 changes: 15 additions & 3 deletions documentation/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#Licensed under the MIT License.
#For details on the licensing terms, see the LICENSE file.
#SPDX-License-Identifier: MIT

#Copyright 2023-2024 (c) Fraunhofer IOSB (Author: Florian Düwel)

# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
Expand All @@ -8,13 +14,19 @@

project = 'SWAP-IT Registry Module'
copyright = '2024, Fraunhofer IOSB (Author:Florian Düwel)'
author = 'Fraunhofer IOSB (Author:Florian Düwel)'
author = 'Florian Düwel'
release = '1.0.0'

html_theme_options = {
"collapse_navigation": True,
"navigation_depth": 2
}

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

extensions = []
extensions = ['sphinx.ext.intersphinx',
'sphinx.ext.autosectionlabel']

templates_path = ['_templates']
exclude_patterns = []
Expand All @@ -24,5 +36,5 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']

0 comments on commit dacc616

Please sign in to comment.