ci: auto-deploy on push (Gitea Actions)
Some checks are pending
Deploy Tracker / deploy (push) Waiting to run
Some checks are pending
Deploy Tracker / deploy (push) Waiting to run
This commit is contained in:
parent
3a1ff3c482
commit
c3035272ba
30
.gitea/workflows/deploy.yml
Normal file
30
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Deploy Tracker
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Pull latest code
|
||||||
|
run: |
|
||||||
|
cd /root/projects/team-board/tracker
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
|
- name: Rebuild and restart
|
||||||
|
run: |
|
||||||
|
cd /root/projects/team-board/tracker
|
||||||
|
docker compose up --build -d tracker
|
||||||
|
|
||||||
|
- name: Run migrations
|
||||||
|
run: |
|
||||||
|
cd /root/projects/team-board/tracker
|
||||||
|
docker compose exec -T tracker alembic upgrade head
|
||||||
|
|
||||||
|
- name: Health check
|
||||||
|
run: |
|
||||||
|
sleep 5
|
||||||
|
curl -sf http://localhost:8100/health || exit 1
|
||||||
|
echo "✅ Tracker deployed successfully"
|
||||||
Loading…
Reference in New Issue
Block a user