-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
67 lines (57 loc) · 1.78 KB
/
Taskfile.yml
File metadata and controls
67 lines (57 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# https://taskfile.dev
version: '3'
env:
ANTORA_SITE_URL: http://localhost:9090
tasks:
prepare:
desc: Prepare npm dependencies.
cmds:
- npm install
dev:
desc: Build the documentation website for development.
cmds:
- npx antora antora-playbook.yml --fetch --html-url-extension-style=default
sources:
- 'antora-playbook.yml'
- 'local-antora-playbook.yml'
- 'package.json'
watch: true
serve:
desc: Serve documentation from a local HTTP server.
cmds:
- npx http-server build/site --watch --port 9090 -c-1
build:
desc: Build documentation for production as a static website.
cmds:
- npm ci
- npx antora antora-playbook.yml --fetch --url ${ANTORA_SITE_URL}
build-oci:
desc: Build documentation for production as a static website served by NGINX.
cmds:
- npm ci
- npx antora antora-playbook.yml --fetch --redirect-facility=nginx --url ${ANTORA_SITE_URL}
- cp -f nginx.conf build/site
package:
desc: Package documentation as an OCI image.
deps:
- build
cmds:
- |-
pack build ghcr.io/arconia-io/docs \
--buildpack docker.io/paketobuildpacks/nginx \
--builder docker.io/paketobuildpacks/builder-jammy-base \
--path build/site
run:
desc: Run documentation as an OCI container.
deps:
- package
cmds:
- podman run --rm -e NGINX_PORT=9090 -e PORT_IN_REDIRECT=on -p 9090:8080 ghcr.io/arconia-io/docs
publish:
desc: Publish documentation as an OCI.
deps:
- package
cmds:
- podman push ghcr.io/arconia-io/docs:latest
- podman tag ghcr.io/arconia-io/docs:latest ghcr.io/arconia-io/docs:$(git rev-parse HEAD)
- podman push ghcr.io/arconia-io/docs:$(git rev-parse HEAD)