[docs] Fix wrong base-url on pages publish

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-08-14 15:49:17 +02:00
parent ad3162e263
commit 8c93544573
Signed by: luzifer
GPG Key ID: D91C3E91E4CAD6F5
2 changed files with 7 additions and 2 deletions

View File

@ -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'

View File

@ -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