-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathrun
More file actions
executable file
·45 lines (40 loc) · 908 Bytes
/
run
File metadata and controls
executable file
·45 lines (40 loc) · 908 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
usage() {
cat <<EOF
Usage: ./run <command>
Commands:
serve Start dev server at http://127.0.0.1:4000 (livereload enabled)
dev Watch + incremental rebuild (no server)
build One-shot production build
stop Stop running containers
clean Remove built site, caches, and Docker volumes
Environment:
JEKYLL_PORT Server port (default: 4000)
JEKYLL_ENV Jekyll environment (default: development)
EOF
exit 1
}
cmd="${1:-}"
shift || true
case "$cmd" in
serve)
docker compose --profile serve up "$@"
;;
dev)
docker compose --profile dev run --rm dev "$@"
;;
build)
docker compose --profile build run --rm build "$@"
;;
stop)
docker compose --profile serve down "$@"
;;
clean)
docker compose --profile serve down -v "$@"
rm -rf _site .jekyll-cache .sass-cache
;;
*)
usage
;;
esac