Compare commits
No commits in common. "4ee40cdcc1e936aa866017af5fa350ec4d1d4457" and "77e61409e4ae548c03263d44f888021c0f785fad" have entirely different histories.
4ee40cdcc1
...
77e61409e4
7 changed files with 0 additions and 149 deletions
|
@ -1,38 +0,0 @@
|
||||||
name: Build Antora Docs
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: catthehacker/ubuntu:act-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ vars.CONTAINER_REGISTRY }}
|
|
||||||
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
|
|
||||||
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: docs/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_NAME_DOCS }}:latest
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
54
Makefile
54
Makefile
|
@ -1,54 +0,0 @@
|
||||||
pages := $(shell find . -type f -name '*.adoc')
|
|
||||||
web_dir := ./_public
|
|
||||||
|
|
||||||
# Determine whether to use podman
|
|
||||||
#
|
|
||||||
# podman currently fails when executing in GitHub actions on Ubuntu LTS 20.04,
|
|
||||||
# so we never use podman if GITHUB_ACTIONS==true.
|
|
||||||
use_podman := $(shell command -v podman 2>&1 >/dev/null; p="$$?"; \
|
|
||||||
if [ "$${GITHUB_ACTIONS}" != "true" ]; then echo "$$p"; else echo 1; fi)
|
|
||||||
|
|
||||||
ifeq ($(use_podman),0)
|
|
||||||
engine_cmd ?= podman
|
|
||||||
engine_opts ?= --rm --tty --userns=keep-id
|
|
||||||
else
|
|
||||||
engine_cmd ?= docker
|
|
||||||
engine_opts ?= --rm --tty --user "$$(id -u)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
# renovate: datasource=github-releases depName=vshn/antora
|
|
||||||
antora_VERSION ?= 3.1.2.3
|
|
||||||
antora_cmd ?= $(engine_cmd) run $(engine_opts) --volume "$${PWD}":/antora ghcr.io/vshn/antora:$(antora_VERSION)
|
|
||||||
|
|
||||||
# renovate: datasource=github-releases depName=vshn/antora-preview
|
|
||||||
preview_VERSION ?= 3.1.2.3
|
|
||||||
antora_opts ?= --cache-dir=.cache/antora
|
|
||||||
preview_cmd ?= $(engine_cmd) run --rm --publish 35729:35729 --publish 2020:2020 --volume "${PWD}":/preview/antora ghcr.io/vshn/antora-preview:$(preview_VERSION) --antora=docs --style=vshn
|
|
||||||
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OS = linux-x64
|
|
||||||
OPEN = xdg-open
|
|
||||||
endif
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OS = darwin-x64
|
|
||||||
OPEN = open
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: docs-clean
|
|
||||||
clean:
|
|
||||||
rm -rf $(web_dir) .cache
|
|
||||||
|
|
||||||
.PHONY: docs-open
|
|
||||||
docs-open: $(web_dir)/index.html
|
|
||||||
-$(OPEN) $<
|
|
||||||
|
|
||||||
.PHONY: docs-html
|
|
||||||
docs-html: $(web_dir)/index.html
|
|
||||||
|
|
||||||
.PHONY: docs-preview
|
|
||||||
docs-preview:
|
|
||||||
$(preview_cmd)
|
|
||||||
|
|
||||||
$(web_dir)/index.html: playbook.yml $(pages)
|
|
||||||
$(antora_cmd) $(antora_opts) $<
|
|
|
@ -1,14 +0,0 @@
|
||||||
# ---------- STEP 1 ----------
|
|
||||||
# Build the documentation in web format
|
|
||||||
FROM ghcr.io/vshn/antora:master AS antora
|
|
||||||
|
|
||||||
WORKDIR /build
|
|
||||||
COPY . /build
|
|
||||||
RUN make docs-html antora_cmd=antora antora_opts=--fetch
|
|
||||||
|
|
||||||
# ---------- STEP 2 ----------
|
|
||||||
# Docker image only containing nginx and the freshly built documentation
|
|
||||||
FROM ghcr.io/vshn/nginx:latest
|
|
||||||
|
|
||||||
# Finally, copy the contents of the documentation to be served
|
|
||||||
COPY --from=antora /build/_public /usr/share/nginx/html
|
|
|
@ -1,6 +0,0 @@
|
||||||
name: ROOT
|
|
||||||
title: Servala Documentation
|
|
||||||
version: ~
|
|
||||||
start_page: ROOT:index.adoc
|
|
||||||
nav:
|
|
||||||
- modules/ROOT/nav.adoc
|
|
|
@ -1 +0,0 @@
|
||||||
* xref:index.adoc[Home]
|
|
|
@ -1,3 +0,0 @@
|
||||||
= Servala
|
|
||||||
|
|
||||||
Hello World
|
|
33
playbook.yml
33
playbook.yml
|
@ -1,33 +0,0 @@
|
||||||
site:
|
|
||||||
title: Servala
|
|
||||||
url: https://docs.servala.com/
|
|
||||||
start_page: servaka::index.adoc
|
|
||||||
robots: |
|
|
||||||
User-agent: *
|
|
||||||
Allow: *
|
|
||||||
content:
|
|
||||||
sources:
|
|
||||||
- url: https://servala-2nkgm.app.codey.ch/servala/servala-portal.git
|
|
||||||
branches: ["main"]
|
|
||||||
start_path: docs
|
|
||||||
edit_url: "https://servala-2nkgm.app.codey.ch/servala/servala-portal/_edit/main/{path}"
|
|
||||||
ui:
|
|
||||||
bundle:
|
|
||||||
url: https://github.com/vshn/antora-ui-default/releases/download/2.2.6/ui-bundle.zip
|
|
||||||
snapshot: true
|
|
||||||
asciidoc:
|
|
||||||
attributes:
|
|
||||||
page-pagination: ""
|
|
||||||
hide-uri-scheme: ""
|
|
||||||
experimental: ""
|
|
||||||
stem: ""
|
|
||||||
icons: font
|
|
||||||
kroki-server-url: https://kroki.vshn.net
|
|
||||||
kroki-fetch-diagram: ""
|
|
||||||
extensions:
|
|
||||||
- asciidoctor-kroki
|
|
||||||
output:
|
|
||||||
destinations:
|
|
||||||
- provider: fs
|
|
||||||
path: ./_public
|
|
||||||
clean: true
|
|
Loading…
Add table
Add a link
Reference in a new issue