Files
research-workbench/.gitea/workflows/deploy.yml
T
Ken 7dd333b19d
Deploy Research Workbench / deploy (push) Failing after 15m18s
ci: add Gitea Actions deploy workflow
Triggers on push to main. Builds frontend, stops old container,
builds and starts new Docker container, verifies the new UI is live.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
2026-05-26 22:21:33 +00:00

61 lines
1.9 KiB
YAML

name: Deploy Research Workbench
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Pull latest code
working-directory: /home/ken/workspace/research-workbench
run: |
git pull origin main
- name: Build frontend
working-directory: /home/ken/workspace/research-workbench/frontend
run: |
npm ci
npm run build
- name: Stop old containers
working-directory: /home/ken/workspace/research-workbench
run: |
# Stop the old car-help container if still running
docker rm -f car-help 2>/dev/null || true
# Stop any existing workbench container
docker compose down 2>/dev/null || true
- name: Build and start container
working-directory: /home/ken/workspace/research-workbench
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
AUTH_USER: ${{ secrets.AUTH_USER }}
AUTH_PASS_HASH: ${{ secrets.AUTH_PASS_HASH }}
run: |
docker compose up --build -d
- name: Wait for healthy
run: |
echo "Waiting for container to start..."
for i in $(seq 1 60); do
if curl -sf http://localhost:8080/ > /dev/null 2>&1; then
echo "App is up at http://localhost:8080/"
exit 0
fi
sleep 2
done
echo "ERROR: App did not respond within 120s"
docker compose -f /home/ken/workspace/research-workbench/docker-compose.yml logs --tail=50
exit 1
- name: Verify new UI is served
run: |
BODY=$(curl -sf http://localhost:8080/ || echo "FETCH_FAILED")
if echo "$BODY" | grep -qi "car-help"; then
echo "ERROR: Still serving old car-help UI!"
exit 1
fi
echo "Deploy successful - new UI is live at https://research.ampbox.io"