Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 21 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
.PHONY: all
all:
@echo "Available targets:"
@echo " community-local Build the local community docs site"
@echo " community-local Build the local community docs site for local workstation test"
@echo " community-remote Build the remote community docs site (as would happen on GH)"
@echo " preview-local-community Preview the local community docs site"
@echo " community-netlify-preview Build the community docs site for Netlify preview (as on Netlify)"
@echo " preview Preview the local community docs site"
@echo " clean Clean build artifacts"
@echo " checkmake Check Makefile for common issues"
@echo " environment Set up the Node.js environment"
@echo " tmpdir Create temporary directories"

.PHONY: community-local
community-local: tmpdir environment
npx antora --version | tee tmp/community-local-build.log
npx antora --version | tee tmp/build.log
npx antora --stacktrace --log-format=pretty --log-level=info \
kw-local-community-playbook.yml \
2>&1 | tee -a tmp/community-local-build.log
cd build-local-community/site && ln -s kubewarden/latest latest
@echo
@echo "If your build was successful, you can preview the site with"
@echo "'make preview-local-community'. The server needs to be used, viewing"
@echo "the html files directly will not work due to the Antora playbook"
@echo "setting 'html_extension_style: drop'."
@echo
2>&1 | tee -a tmp/build.log
Comment thread
jhkrug marked this conversation as resolved.
cd build/site && ln -s kubewarden/latest latest
Comment thread
jhkrug marked this conversation as resolved.
@echo ""
@echo "If your build was successful, you can preview the site with"
@echo "'make preview'."
@echo ""

.PHONY: community-remote
community-remote: tmpdir environment
npx antora --version | tee tmp/community-remote-build.log
npx antora --version | tee tmp/build.log
npx antora --stacktrace --log-format=pretty --log-level=info \
kw-remote-community-playbook.yml \
2>&1 | tee -a tmp/community-remote-build.log
2>&1 | tee -a tmp/build.log
cd build/site && ln -s kubewarden/latest latest

.PHONY: community-remote-netlify
community-remote-netlify: tmpdir environment
npx antora --version | tee tmp/community-remote-netlify-build.log
npx antora --stacktrace --log-format=pretty --log-level=info \
kw-remote-community-netlify-playbook.yml \
2>&1 | tee -a tmp/community-remote-netlify-build.log
.PHONY: community-netlify-preview
community-netlify-preview: tmpdir environment
npx antora --version | tee tmp/build.log
npx antora --attribute build-environment=netlify --stacktrace --log-format=pretty --log-level=info \
kw-local-community-playbook.yml \
2>&1 | tee -a tmp/build.log
cd build/site && ln -s kubewarden/latest latest


Expand All @@ -63,9 +62,9 @@ checkmake:
fi; \
else echo "checkmake not available"; fi

.PHONY: preview-local-community
preview-local-community:
npx http-server build-local-community/site -c-1
.PHONY: preview
preview:
npx http-server build/site -c-1

.PHONY: test
test:
8 changes: 1 addition & 7 deletions kw-local-community-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ site:
title: Kubewarden
start_page: 1.0@kubewarden:en:introduction.adoc

# urls:
# html_extension_style: drop
# latest_version_segment: ''
# latest_prerelease_version_segment: dev
# latest_version_segment_strategy: replace

content:
sources:
- url: ./
Expand Down Expand Up @@ -47,4 +41,4 @@ antora:


output:
dir: build-local-community/site
dir: build/site
51 changes: 0 additions & 51 deletions kw-remote-community-netlify-playbook.yml

This file was deleted.

6 changes: 0 additions & 6 deletions kw-remote-community-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ site:
title: Kubewarden
start_page: 1.0@kubewarden:en:introduction.adoc

# urls:
# html_extension_style: drop
# latest_version_segment: ''
# latest_prerelease_version_segment: dev
# latest_version_segment_strategy: replace

content:
sources:
- url: https://github.com/kubewarden/docs.git
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Configuration file to customize the build process of the website on Netlify.
[build]
publish = "build/site"
command = "make community-remote-netlify"
command = "make community-netlify-preview"

#[build.environment]
# NODE_OPTIONS = "--max_old_space_size=4096"
Expand Down
Loading