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