@@ -80,49 +80,49 @@ jobs:
8080 -f notification-svc/Dockerfile \
8181 -t $REGISTRY/$IMAGE_NAMESPACE/notification-svc:$VERSION .
8282 docker push $REGISTRY/$IMAGE_NAMESPACE/notification-svc:$VERSION
83- deploy :
84- runs-on : ubuntu-latest
85- needs : build-and-push
83+ deploy :
84+ runs-on : ubuntu-latest
85+ needs : build-and-push
8686
87- env :
88- APP_VERSION : ${{ github.ref_name }}
89- REGISTRY : ghcr.io
90- IMAGE_NAMESPACE : hervibest
87+ env :
88+ APP_VERSION : ${{ github.ref_name }}
89+ REGISTRY : ghcr.io
90+ IMAGE_NAMESPACE : hervibest
9191
92- steps :
93- - name : Setup SSH agent
94- uses : webfactory/ssh-agent@v0.9.0
95- with :
96- ssh-private-key : ${{ secrets.VPS_SSH_KEY }}
92+ steps :
93+ - name : Setup SSH agent
94+ uses : webfactory/ssh-agent@v0.9.0
95+ with :
96+ ssh-private-key : ${{ secrets.VPS_SSH_KEY }}
9797
98- - name : Deploy to VPS
99- run : |
100- ssh -o StrictHostKeyChecking=no \
101- ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} << EOF
98+ - name : Deploy to VPS
99+ run : |
100+ ssh -o StrictHostKeyChecking=no \
101+ ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} << EOF
102102
103- set -euo pipefail
103+ set -euo pipefail
104104
105- cd /home/ubuntu/app/be-yourmoments-backup
105+ cd /home/ubuntu/app/be-yourmoments-backup
106106
107- echo "APP_VERSION=${APP_VERSION}" > .env
107+ echo "APP_VERSION=${APP_VERSION}" > .env
108108
109- echo "🔐 Login to GHCR"
110- echo "${{ secrets.REGISTRY_PASSWORD }}" | \
111- docker login ${REGISTRY} \
112- -u hervibest \
113- --password-stdin
109+ echo "🔐 Login to GHCR"
110+ echo "${{ secrets.REGISTRY_PASSWORD }}" | \
111+ docker login ${REGISTRY} \
112+ -u hervibest \
113+ --password-stdin
114114
115- echo "📦 Pull images"
116- docker compose -f docker-compose-dev.yaml pull
115+ echo "📦 Pull images"
116+ docker compose -f docker-compose-dev.yaml pull
117117
118- echo "🛑 Stop containers"
119- docker compose -f docker-compose-dev.yaml down
118+ echo "🛑 Stop containers"
119+ docker compose -f docker-compose-dev.yaml down
120120
121- echo "🚀 Start containers"
122- docker compose -f docker-compose-dev.yaml up -d
121+ echo "🚀 Start containers"
122+ docker compose -f docker-compose-dev.yaml up -d
123123
124- echo "🧹 Cleanup images"
125- docker image prune -f
124+ echo "🧹 Cleanup images"
125+ docker image prune -f
126126
127- echo "✅ Deploy finished"
128- EOF
127+ echo "✅ Deploy finished"
128+ EOF
0 commit comments