We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d7b551 commit 313b6e1Copy full SHA for 313b6e1
1 file changed
.github/workflows/deploy.yml
@@ -42,3 +42,22 @@ jobs:
42
- name: Push backend image
43
run: |
44
docker push ghcr.io/${{ github.repository_owner }}/portfolio-backend:latest
45
+
46
+ - name: Deploy to homelab server
47
+ if: github.ref == 'refs/heads/main'
48
+ uses: appleboy/ssh-action@v1.0.3
49
+ with:
50
+ host: ${{ secrets.HOMELAB_HOST }}
51
+ username: ${{ secrets.HOMELAB_USER }}
52
+ key: ${{ secrets.HOMELAB_SSH_KEY }}
53
+ port: ${{ secrets.HOMELAB_SSH_PORT }}
54
+ script: |
55
+ set -e
56
+ cd ~/projects/local-smart-portfolio
57
+ echo "📥 Pulling latest images..."
58
+ docker compose pull
59
+ echo "🔄 Recreating containers..."
60
+ docker compose up -d --force-recreate
61
+ echo "🧹 Cleaning up old images..."
62
+ docker image prune -f
63
+ echo "✅ Deployment complete!"
0 commit comments