Skip to content

Commit 6b690a2

Browse files
authored
Merge pull request #30 from softwarepub/create-docs-page
Create basic GitHub pages for docs.
2 parents 8c4f529 + 08c1de9 commit 6b690a2

11 files changed

Lines changed: 155 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# SPDX-FileCopyrightText: 2025 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2+
# SPDX-License-Identifier: CC0-1.0
3+
# SPDX-FileContributor: David Pape
4+
5+
name: documentation
6+
7+
on: [push, pull_request, workflow_dispatch]
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
docs:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
18+
- name: Install Package
19+
run: |
20+
python -m pip install .[docs]
21+
- name: Build Documentation
22+
run: |
23+
task docs-build
24+
- name: Deploy to GitHub Pages Branch
25+
uses: peaceiris/actions-gh-pages@v4
26+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
27+
with:
28+
publish_branch: gh-pages
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: docs/_build/html/
31+
force_orphan: true

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,29 @@ The associated IRIs currently don't exist.
9090
A [search on prefix.cc](https://prefix.cc/sc) reveals prior usage of the prefix `sc:` by projects which seem to be
9191
defunct.
9292

93+
## Documentation
94+
95+
To build the documentation, install the package including the `docs` extra:
96+
97+
```bash
98+
python -m pip install -e .[docs]
99+
```
100+
101+
Then run Sphinx via the predefined task:
102+
103+
```bash
104+
task docs-build # build the docs
105+
task docs-clean # delete the built docs
106+
```
107+
108+
To view the docs in the browser, run
109+
110+
```bash
111+
python -m http.server -b 127.0.0.1 -d docs/_build/html
112+
```
113+
114+
Then follow the link <http://127.0.0.1:8000/>.
115+
93116
## Acknowledgments
94117

95118
[Software CaRD](https://helmholtz-metadaten.de/en/inf-projects/softwarecard) (`ZT-I-PF-3-080`) is funded by the

docs/_static/.gitkeep

Whitespace-only changes.

docs/_templates/.gitkeep

Whitespace-only changes.

docs/conf.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-FileCopyrightText: 2025 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2+
# SPDX-License-Identifier: Apache-2.0
3+
# SPDX-FileContributor: David Pape
4+
5+
# Configuration file for the Sphinx documentation builder.
6+
#
7+
# For the full list of built-in configuration values, see the documentation:
8+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
9+
10+
# -- Project information -----------------------------------------------------
11+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
12+
13+
project = "Software CaRD Policies"
14+
copyright = "2025 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)"
15+
author = "David Pape"
16+
17+
# -- General configuration ---------------------------------------------------
18+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
19+
20+
extensions = []
21+
22+
templates_path = ["_templates"]
23+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
24+
25+
26+
# -- Options for HTML output -------------------------------------------------
27+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
28+
29+
html_theme = "alabaster"
30+
html_static_path = ["_static"]

docs/example-policies/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. SPDX-FileCopyrightText: 2025 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2+
SPDX-License-Identifier: CC-BY-4.0
3+
SPDX-FileContributor: David Pape
4+
5+
Example Policies
6+
================
7+
8+
.. note::
9+
10+
This is a placeholder for an overview of example policies following the Software CaRD policy specification.

docs/index.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. SPDX-FileCopyrightText: 2025 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2+
SPDX-License-Identifier: CC-BY-4.0
3+
SPDX-FileContributor: David Pape
4+
5+
Software CaRD Policies
6+
======================
7+
8+
Welcome to the *Software CaRD Policies* documentation.
9+
10+
.. note::
11+
12+
This page is a work in progress.
13+
Some things will be missing or simply not work.
14+
15+
.. toctree::
16+
:hidden:
17+
:maxdepth: 2
18+
19+
specification/index
20+
example-policies/index
21+
validator/index
22+
library/index

docs/library/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. SPDX-FileCopyrightText: 2025 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2+
SPDX-License-Identifier: CC-BY-4.0
3+
SPDX-FileContributor: David Pape
4+
5+
Library
6+
=======
7+
8+
.. note::
9+
10+
This is a placeholder for the documentation of the ``sc_validate`` library.

docs/specification/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. SPDX-FileCopyrightText: 2025 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2+
SPDX-License-Identifier: CC-BY-4.0
3+
SPDX-FileContributor: David Pape
4+
5+
Specification
6+
=============
7+
8+
.. note::
9+
10+
This is a placeholder for the Software CaRD policy specification.

docs/validator/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. SPDX-FileCopyrightText: 2025 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2+
SPDX-License-Identifier: CC-BY-4.0
3+
SPDX-FileContributor: David Pape
4+
5+
Validator
6+
=========
7+
8+
.. note::
9+
10+
This is a placeholder for the documentation of the ``sc-validate`` command line tool.
11+
12+
The validator can be run using the ``sc-validate`` command which is equivalent to ``python -m sc_validate``.

0 commit comments

Comments
 (0)