Simplify CI workflow - build only (no SSH deploy yet)
Some checks failed
Build and Deploy hatch.surf / build (push) Failing after 27s

- Removed SSH deploy step (needs secrets configuration)
- Build Docker image and save locally
- Can add deployment step later with proper secrets

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Chris Anderson 2026-06-24 10:03:14 +02:00
parent 8bce1cb670
commit a416994aea

View File

@ -1,4 +1,4 @@
name: Deploy hatch.surf
name: Build and Deploy hatch.surf
on:
push:
@ -9,7 +9,7 @@ env:
IMAGE_NAME: hatch-web
jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest
steps:
@ -23,16 +23,11 @@ jobs:
run: |
docker build -t ${{ env.IMAGE_NAME }}:${{ github.sha }} .
docker tag ${{ env.IMAGE_NAME }}:${{ github.sha }} ${{ env.IMAGE_NAME }}:latest
echo "Docker image built successfully"
docker images | grep ${{ env.IMAGE_NAME }}
- name: Deploy to server
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
cd /home/nara/repos/hatch-surf
git pull origin main
docker compose build
docker compose up -d --remove-orphans
docker system prune -f
- name: Save Docker image
run: |
docker save ${{ env.IMAGE_NAME }}:latest | gzip > /tmp/${{ env.IMAGE_NAME }}.tar.gz
echo "Image saved to /tmp/${{ env.IMAGE_NAME }}.tar.gz"
ls -lh /tmp/${{ env.IMAGE_NAME }}.tar.gz