Add docker file
Some checks failed
Build Notes Site / build (push) Failing after 7s

This commit is contained in:
Jay
2026-03-03 10:35:06 +00:00
parent 206688ab77
commit 4d56663b96
3 changed files with 19 additions and 17 deletions

View File

@@ -7,26 +7,18 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
# Bigger container: Ubuntu with Python preinstalled
image: ubuntu:22.04
steps: steps:
# 1⃣ Checkout the repository
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
# 2⃣ Install Python, pip, and MkDocs - name: Build docker image
- name: Setup Python and MkDocs
run: | run: |
apt-get update docker build -t mkdocs-builder -f ci/mkdocs/Dockerfile ci/mkdocs
apt-get install -y python3 python3-pip git curl
pip3 install --upgrade pip
pip3 install mkdocs mkdocs-material pymdown-extensions
# 3Build MkDocs site to /public (mapped to Docker volume) - name: Build MKDocs output into shared volume
- name: Build MkDocs run: |
run: mkdocs build --site-dir /public docker run --rm \
-v "$PWD:/work" -w /work \
# 4⃣ Verify output -v notes_public:/public \
- name: Verify output mkdocs-builder \
run: ls -l /public mkdocs build --clean --site-dir /public

7
ci/mkdocs/Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM python:3.13-slim
WORKDIR /work
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt

View File

@@ -0,0 +1,3 @@
mkdocs==1.6.1
mkdocs-material==9.7.3
pymdown-extensions==10.21