Skip to content

Commit 23a67dc

Browse files
committed
publish exactly whats needed
1 parent e2a2b94 commit 23a67dc

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/workflows/publish_ghpages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
go-version-file: 'go.mod'
1919
-
2020
name: Build and generate docs
21-
run: make docs
21+
run: make docs DOCS_TARGET=pages
2222
-
2323
name: Deploy
2424
uses: JamesIves/github-pages-deploy-action@v4
2525
with:
26-
folder: docs
26+
folder: pages

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
BUILD_TS := $(shell date -Iseconds -u)
22
COMMIT_SHA := $(shell git rev-parse HEAD)
33
VERSION := $(shell git describe --abbrev=0 --tags || echo "latest")
4+
DOCS_TARGET ?= docs
45

56
export CGO_ENABLED=0
67

@@ -48,7 +49,9 @@ build:
4849
.PHONY: docs
4950
docs: build
5051
touch /tmp/empty.yaml
51-
./kafkactl docs --directory docs --single-page --config-file=/tmp/empty.yaml
52+
./kafkactl docs --directory $(DOCS_TARGET) --single-page --config-file=/tmp/empty.yaml
53+
echo "![version](https://img.shields.io/badge/version-$(VERSION)-blue)" > $(DOCS_TARGET)/version.md
54+
cp index.md $(DOCS_TARGET)
5255

5356
.PHONY: clean
5457
clean:

index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# kafkactl command documentation
22

3-
{% include_relative docs/kafkactl_docs.md %}
3+
{% include_relative version.md %}
4+
5+
{% include_relative kafkactl_docs.md %}

0 commit comments

Comments
 (0)