chore: add CD

This commit is contained in:
2026-05-02 18:10:33 +02:00
parent a9d8fb5297
commit 90a23b065b
2 changed files with 41 additions and 6 deletions
+18 -2
View File
@@ -88,7 +88,23 @@ jobs:
context: .
file: docker/frontend/Dockerfile
push: true
tags: |
xor1234/frontend-mln:latest
tags: xor1234/frontend-mln:latest
build-args: |
VITE_TOMTOM_API_KEY=${{ secrets.VITE_TOMTOM_API_KEY }}
deploy:
name: Deploy to server
needs: docker
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/pre-prod'
steps:
- name: SSH deploy
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
docker compose -f ${{ secrets.COMPOSE_PATH }} pull frontend
docker compose -f ${{ secrets.COMPOSE_PATH }} up -d --no-deps frontend