backend/.gitlab-ci.yml

24 lines
645 B
YAML

stages:
- prepare
- build
- deploy
remove-old-services:
stage: prepare
script:
- systemctl --user stop little-lines-backend
- podman rm --force little-lines-backend
- cp little-lines-backend.container ~/.config/containers/systemd
- systemctl --user daemon-reload
container-build:
stage: build
script:
- sed -i "s/DATE/$(date -I)/g" ${CI_PROJECT_DIR}/server.js
- sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" ${CI_PROJECT_DIR}/server.js
- podman build -t little-lines-backend .
container-deploy:
stage: deploy
script:
- systemctl --user start little-lines-backend