Deploy static assets to edge
This commit is contained in:
parent
5cabc31d37
commit
24879a72e5
1 changed files with 12 additions and 0 deletions
12
Makefile
12
Makefile
|
|
@ -9,6 +9,7 @@ help:
|
|||
@echo "make images — convert content/images/*.jpg → WebP"
|
||||
@echo "make artists — regenerate artists.json from audio.yaml"
|
||||
@echo "make content — artists + images + audio"
|
||||
@echo "make deploy-assets — rsync web/static/{audio,images}/ to sprade for production"
|
||||
@echo "make tag V=patch|minor|major — bump version tag and push"
|
||||
@echo "make prefetch — print sha256 + npmDepsHash + vendorHash for the homelab module"
|
||||
|
||||
|
|
@ -31,6 +32,17 @@ artists:
|
|||
.PHONY: content
|
||||
content: artists images audio
|
||||
|
||||
.PHONY: deploy-assets
|
||||
deploy-assets:
|
||||
@if [ ! -d web/static/audio ] || [ -z "$$(ls web/static/audio 2>/dev/null)" ]; then \
|
||||
echo "error: web/static/audio is empty. Run \`make audio\` first." >&2; exit 1; \
|
||||
fi
|
||||
@if [ ! -d web/static/images ] || [ -z "$$(ls web/static/images 2>/dev/null)" ]; then \
|
||||
echo "error: web/static/images is empty. Run \`make images\` first." >&2; exit 1; \
|
||||
fi
|
||||
rsync -av --delete --progress web/static/audio/ deploy@sprade:/var/lib/docent/audio/
|
||||
rsync -av --delete --progress web/static/images/ deploy@sprade:/var/lib/docent/images/
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
cd web && npm install && npm run build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue