This commit is contained in:
@@ -8,17 +8,36 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: gitea/act_runner:latest
|
image: node:20-bookworm
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# 1️⃣ Checkout repository
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Python + MkDocs
|
# 2️⃣ Install Docker CLI in container
|
||||||
|
- name: Install Docker CLI
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y python3 python3-venv
|
apt-get install -y ca-certificates curl gnupg lsb-release
|
||||||
python3 -m venv .venv
|
install -m 0755 -d /etc/apt/keyrings
|
||||||
.venv/bin/pip install --upgrade pip
|
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
.venv/bin/pip install -r ci/mkdocs/requirements.txt
|
chmod a+r /etc/apt/keyrings/docker.gpg
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
|
||||||
|
https://download.docker.com/linux/debian $(lsb_release -cs) stable" | \
|
||||||
|
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y docker-ce-cli
|
||||||
|
|
||||||
- name: Build site
|
# 3️⃣ Build MkDocs into Docker volume
|
||||||
run: .venv/bin/mkdocs build --clean --site-dir /public
|
- name: Build MkDocs into notes_public volume
|
||||||
|
run: |
|
||||||
|
docker run --rm \
|
||||||
|
-v notes_public:/public \
|
||||||
|
-v "${{ github.workspace }}:/work" \
|
||||||
|
-w /work \
|
||||||
|
python:3.13-slim \
|
||||||
|
sh -c "python3 -m venv .venv && \
|
||||||
|
.venv/bin/pip install --upgrade pip && \
|
||||||
|
.venv/bin/pip install -r ci/mkdocs/requirements.txt && \
|
||||||
|
.venv/bin/mkdocs build --clean --site-dir /public"
|
||||||
|
|||||||
Reference in New Issue
Block a user