diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa18774..a7adb0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,9 +30,9 @@ jobs: - name: Install python requirements run: python3 -m pip install -r requirements.txt - + - name: Deploy - env: + env: GIT_SSH_COMMAND: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" GIT_AUTHOR_NAME: "Rocky Bot" GIT_AUTHOR_EMAIL: "auto@rockylinux.org" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..45ddf0a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +site/ diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..2c37103 --- /dev/null +++ b/Containerfile @@ -0,0 +1,8 @@ +FROM quay.io/rockylinux/rockylinux:9 + +RUN dnf -y upgrade +RUN dnf install -y git python3 python3-pip cairo-devel + +COPY . /wiki +WORKDIR /wiki +RUN pip install -r requirements.txt diff --git a/README.md b/README.md index 3b97523..410b74d 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,30 @@ ## Continuous Integration / Continuous Deployment -Actions Runner executes workflow to publish to https://community.rocky.page on push to main. +Actions Runner executes workflow to publish to https://REPLACEME.rocky.page on push to main. + +## Building Locally + +In order to build this wiki locally, a docker-compose configuration and container file are supplied which when invoked, will launch mkdocs' development server in a container bound to port 8000 and will live-reload when changes are made to the wiki files. + +To run the containers on your system, invoke podman or docker compose like so: + +``` +podman-compose -f docker-compose.yml up -d +``` + +The container will build and then launch itself. Afterwards, you should be able to view the wiki content at http://localhost:8000. + +The compose file accepts a build argument if you need to run it on a different port. For example, to bind to port 8080 on your local machine: + +``` +podman-compose -f docker-compose --build-arg PORT=8080 up -d +``` ## Project layout mkdocs.yml # The configuration file. - README.md # This file you're reading + README.md # This file. docs/ index.md # The documentation homepage. ... # Other markdown pages, images and other files. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7d7ca2f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +--- +version: '3' + +services: + wiki: + build: + context: . + dockerfile: Containerfile + command: ["mkdocs", "serve","--dev-addr", "0.0.0.0:${PORT:-8000}"] + volumes: + - .:/wiki:z,rw + ports: + - "${PORT:-8000}:8000" diff --git a/mkdocs.yml b/mkdocs.yml index 009a458..9af3924 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,7 +12,7 @@ repo_name: community/wiki edit_uri: _edit/main/docs/ # Copyright -copyright: Copyright © 2023 Rocky Enterprise Software Foundation +copyright: Copyright © 2024 Rocky Enterprise Software Foundation # Configuration theme: @@ -71,8 +71,8 @@ markdown_extensions: - meta - pymdownx.details # this allows collapsible attributions - 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.superfences - pymdownx.tabbed: alternate_style: true