This commit is contained in:
2026-07-13 12:30:05 +08:00
parent 7d61aadc5d
commit f25e128299
2023 changed files with 9042 additions and 922 deletions
+39 -30
View File
@@ -1,49 +1,58 @@
## image: Run mkdocs with live-reloading (localhost:3000)
live:
@echo "Wait until container starts and open http://localhost:3000 to see live preview"
@docker run \
--pull always \
.DEFAULT_GOAL := help
.PHONY: clear live site image push run help
## clear = Remove cache directories
clear:
rm -rf __pycache__ .cache site
## live = Run zensical with live-reloading on http://localhost:8801
live: clear
@echo "*** Wait until container starts and open http://localhost:8801 to see live preview"
@docker stop iptv-docs-dev 2>/dev/null; \
docker run \
--rm \
--interactive \
--tty \
--publish 3000:8000 \
--env PYTHONPATH=/docs \
--publish 8801:8801 \
--volume ${PWD}:/docs \
--name iptv-docs-dev \
squidfunk/mkdocs-material:9.6.20
zensical/zensical:latest
## image: Build local static site
site:
@echo "Wait until mkdocs finish"
@docker run \
## site = Build a local static site
site: clear
@echo "*** Wait until zensical finish"
@docker stop iptv-docs-dev 2>/dev/null; \
docker run \
--pull always \
--rm \
--interactive \
--tty \
--env PYTHONPATH=/docs \
--volume ${PWD}:/docs \
--name iptv-docs-dev \
squidfunk/mkdocs-material:9.6.20 build
zensical/zensical:latest \
build \
--clean
## image: Build docker image
## image = Build a docker image
image:
@docker build \
--tag iptv-docs:latest \
--tag git.axenov.dev/iptv/iptv-docs:latest \
.
@docker build --tag git.axenov.dev/iptv/iptv-docs:latest:latest .
## push: Push docker image to registry
push:
@docker push git.axenov.dev/iptv/iptv-docs:latest
## run: Run docker image (localhost:3001)
## run = Run docker container from image built with `make image` on http://localhost:8802
run:
@echo "Wait until container starts and open http://localhost:3001 to see ready static website"
@docker run \
@echo "*** Wait until container starts and open http://localhost:8802 to see ready static website"
@docker stop iptv-docs 2>/dev/null; \
docker run \
--rm \
--publish 3001:80 \
--publish 8802:80 \
--name iptv-docs \
git.axenov.dev/iptv/iptv-docs:latest
git.axenov.dev/iptv/iptv-docs:latest:latest
## help: Show this message and exit
# push = Push docker image built with `make image` to git.axenov.dev
push:
@docker login git.axenov.dev; \
docker push git.axenov.dev/iptv/iptv-docs:latest:latest
## help = Show this message and exit (default)
help: Makefile
@echo "Available recipes:"
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@sed -n 's/^##/ /p' $< | column -t -s '='