Files
HarunCAN_Studio_BE/.gitea/workflows/deploy.yml
Fahri Can Seçer c7c7788f54
All checks were successful
Backend Deploy 🚀 / build-and-deploy (push) Successful in 25s
Update deploy.yml
2026-03-23 00:01:59 +03:00

40 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Backend Deploy 🚀
run-name: ${{ gitea.actor }} backend güncelliyor...
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Kodu Çek
uses: actions/checkout@v3
- name: Docker Build
run: docker build -t backend-haruncan-studio:latest .
- name: Eski Konteyneri Sil
run: docker rm -f backend-haruncan-studio-container || true
- name: Veritabanı Migration
run: |
docker run --rm \
--network docker-data_gitea \
-e DATABASE_URL='${{ secrets.DATABASE_URL }}' \
backend-haruncan-studio:latest \
npx prisma migrate deploy
- name: Yeni Versiyonu Başlat
run: |
docker run -d \
--name backend-haruncan-studio-container \
--restart always \
--network docker-data_gitea \
-p 1809:3000 \
-e DATABASE_URL='${{ secrets.DATABASE_URL }}' \
-e JWT_SECRET='${{ secrets.JWT_SECRET }}' \
-e NODE_ENV='production' \
backend-haruncan-studio:latest