From 011b645c397c356fa7228ca25c77e439c370b4c4 Mon Sep 17 00:00:00 2001 From: Niklas Widmann Date: Sun, 22 Sep 2024 20:51:59 +0200 Subject: [PATCH] add CI params --- .github/workflows/build.yml | 4 +++- Dockerfile | 8 ++++++++ mkdocs.yml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc04bc2..63cf1f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,6 @@ name: Build Container on: push: branches: [release] - workflow_dispatch: env: REGISTRY: ghcr.io @@ -42,3 +41,6 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + repo_url=https://github.com/${{ env.GITHUB_REPO }} + site_url=${{ secrets.SITE_URL }} diff --git a/Dockerfile b/Dockerfile index 2e4b68a..6e8682e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,18 @@ FROM squidfunk/mkdocs-material:latest AS builder +ENV CI=true + # install dependencies COPY requirements.txt . RUN pip install -r requirements.txt # build the project +ARG repo_url +ENV REPO_URL=repo_url + +ARG site_url +ENV SITE_URL=site_url + COPY docs docs COPY mkdocs.yml . RUN mkdocs build diff --git a/mkdocs.yml b/mkdocs.yml index 97d89bc..bc6f71b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,7 @@ site_name: Galena Wiki -repo_url: https://github.com/TeamGalena/Wiki edit_uri: edit/main/docs/ site_url: !ENV [SITE_URL, "http://localhost:8000"] +repo_url: !ENV [REPO_URL] theme: name: material