From 8c935445735eb383b9acc82f1001f12bb125a20e Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 14 Aug 2023 15:49:17 +0200 Subject: [PATCH] [docs] Fix wrong base-url on pages publish Signed-off-by: Knut Ahlers --- .github/workflows/doc-generator.yml | 2 +- Makefile | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc-generator.yml b/.github/workflows/doc-generator.yml index 179aa93..ca14f76 100644 --- a/.github/workflows/doc-generator.yml +++ b/.github/workflows/doc-generator.yml @@ -42,7 +42,7 @@ jobs: run: git config --global --add safe.directory /__w/twitch-bot/twitch-bot - name: Generate documentation - run: make render_docs + run: make render_docs DOCS_BASE_URL=https://luzifer.github.io/twitch-bot/ - name: Upload GitHub Pages artifact if: github.ref == 'refs/heads/master' diff --git a/Makefile b/Makefile index 7c82cfd..431df6e 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +DOCS_BASE_URL:=/ HUGO_VERSION:=0.117.0 default: lint frontend_lint test @@ -64,7 +65,11 @@ eventclient_docs: docker run --rm -i -v $(CURDIR):$(CURDIR) -w $(CURDIR) node:18-alpine sh -ec 'npx --yes jsdoc-to-markdown --files ./internal/apimodules/overlays/default/eventclient.js' >>docs/content/overlays/eventclient.md render_docs: hugo_$(HUGO_VERSION) - ./hugo_$(HUGO_VERSION) --cleanDestinationDir --gc --source docs + ./hugo_$(HUGO_VERSION) \ + --baseURL "$(DOCS_BASE_URL)" \ + --cleanDestinationDir \ + --gc \ + --source docs hugo_$(HUGO_VERSION): curl -sSfL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_linux-amd64.tar.gz | tar -xz hugo