Skip to content

Commit

Permalink
TELESTION-446 Add GitHub action to publish
Browse files Browse the repository at this point in the history
Fix build issues, now building using `docker-compose`. This also creates an easier to work with environment for editing the documentation.

From now on, to work on the docs, run

```sh
docker compose up --build
```

and to build the docs, run

```sh
docker compose run mkdocs build
```
  • Loading branch information
pklaschka committed Dec 15, 2023
1 parent ba040f9 commit 4b34403
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 1,630 deletions.
12 changes: 12 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# IDEs / Editors
.idea

# Vale
styles

# Build
.cache
site

# OS X
.DS_Store
14 changes: 4 additions & 10 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@

### Prerequisites

* [Python 3.9](https://www.python.org/downloads/)
* [pip](https://pip.pypa.io/en/stable/installing/)

### Installation

1. Clone this repository
2. Run `pip install -r requirements.txt` to install the required Python packages
* `docker` and `docker-compose` installed

### Running locally

1. Run `python -m mkdocs serve` to start the local development server
2. Open [http://localhost:8000](http://localhost:8000) in your browser
1. Run `docker compose up --build` to start the local development server
2. Open [http://localhost:4044](http://localhost:4044) in your browser

### Building

1. Run `python -m mkdocs build` to build the documentation
1. Run `docker compose run mkdocs build` to build the documentation
2. The generated HTML files are located in the `site` directory
10 changes: 10 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM squidfunk/mkdocs-material:9
MAINTAINER "WüSpace e.V."

# Install mkdocs plugins from requirements.txt
COPY requirements.txt /docs/requirements.txt
RUN pip install -r /docs/requirements.txt

STOPSIGNAL SIGKILL
ENTRYPOINT ["mkdocs"]
CMD ["serve", "--dev-addr=0.0.0.0:4044"]
12 changes: 12 additions & 0 deletions docs/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
mkdocs:
image: telestion/mkdocs
ports:
- 4044:4044
volumes:
- .:/docs
build:
context: .
dockerfile: Dockerfile
args:
DOCKER_BUILDKIT: 1
21 changes: 0 additions & 21 deletions docs/docs/_js/mermaid/LICENSE

This file was deleted.

1,580 changes: 0 additions & 1,580 deletions docs/docs/_js/mermaid/mermaid.min.js

This file was deleted.

7 changes: 4 additions & 3 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json
site_name: Telestion Documentation

theme:
Expand Down Expand Up @@ -33,7 +34,6 @@ extra_css:

extra_javascript:
- _js/main.js
- _js/mermaid/mermaid.min.js

markdown_extensions:
- smarty
Expand All @@ -43,8 +43,8 @@ markdown_extensions:
- attr_list
- md_in_html
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.keys
- pymdownx.highlight:
anchor_linenums: true
Expand All @@ -65,6 +65,7 @@ plugins:
- awesome-pages
- tags
- search
- privacy

extra:
social:
Expand Down
11 changes: 1 addition & 10 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{% extends "base.html" %}

<!--
{% block extrahead %}
<meta name="robots" content="noindex, nofollow" />
<!--<meta name="robots" content="noindex, nofollow" />-->
{% endblock %}
-->

<!--
{% block announce %}
&lt;!&ndash; Add announcement here, including arbitrary HTML &ndash;&gt;
⚠️ This is a development version of the documentation. You can find the latest documentation at <a href="https://docs.telestion.wuespace.de">docs.telestion.wuespace.de</a>.
{% endblock %}
-->
1 change: 0 additions & 1 deletion docs/preview.cmd

This file was deleted.

1 change: 0 additions & 1 deletion docs/preview.sh

This file was deleted.

8 changes: 4 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mkdocs==1.4.3
mkdocs-awesome-pages-plugin==2.9.0
mkdocs-material==9.1.9
mkdocs-material-extensions==1.1.1
mkdocs==1.5.3
mkdocs-awesome-pages-plugin==2.9.2
mkdocs-material==9.5.2
mkdocs-material-extensions==1.3.1

0 comments on commit 4b34403

Please sign in to comment.