Repository navigation
71 lines (56 loc) · 1.82 KB
/
Copy pathdocs.yml
File metadata and controls
71 lines (56 loc) · 1.82 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
68
69
70
71
name: Build and Deploy Docs
on:
workflow_dispatch:
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Copy README and DOC
run: |
mkdir -p docs
cp -av README.md docs/
cp -av DOC.md docs/
- name: Ensure target directory exists
run: mkdir -p src/main/resources/static/docs
- name: Build MKDocs
run: |
docker run --rm \
-u $(id -u):$(id -g) \
-v "$PWD":/docs \
squidfunk/mkdocs-material \
build --clean --site-dir src/main/resources/static/docs
- name: Build PDF
run: |
for f in docs/*.md; do
if [ -f "$f" ]; then
filename=$(basename -- "$f" .md)
docker run --rm \
-u $(id -u):$(id -g) \
-v "$PWD":/data \
pandoc/extra "$f" \
--pdf-engine=xelatex \
-o "src/main/resources/static/docs/${filename}.pdf"
fi
done
- name: Build Docker
run: |
docker build -f Dockerfile -t app:latest .
- name: Build Podman
run: |
podman build -f Containerfile -t localhost/app:latest .
- name: Deploy Docker
run: |
docker rm -f devops-app 2>/dev/null || true
docker run -d \
--name devops-app \
-p 8080:8080 \
app:latest
- name: Deploy Podman
run: |
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
mkdir -p ~/.config/containers/systemd/
cp -av app.container ~/.config/containers/systemd/
systemctl --user daemon-reload
systemctl --user restart app.service