Files
boilerplate-be/.gitea/workflows/deploy.yml
Fahri Can Seçer d52abd9b86
Some checks failed
Backend Deploy 🚀 / build-and-deploy (push) Failing after 35s
main
2026-01-27 00:17:11 +03:00

35 lines
985 B
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
# Dockerfile'ı kullanarak imajı oluşturuyoruz
run: docker build -t backend-proje:latest .
- name: Eski Konteyneri Sil
# İlk seferde hata vermemesi için '|| true' ekledik
run: docker rm -f backend-container || true
- name: Yeni Versiyonu Başlat
# Secrets kısmından şifreleri alıp konteynere veriyoruz
run: |
docker run -d \
--name backend-container \
--restart always \
--network gitea \
-p 1501:3000 \
-e DATABASE_URL='${{ secrets.DATABASE_URL }}' \
-e REDIS_HOST='${{ secrets.REDIS_HOST }}' \
-e REDIS_PORT='6379' \
backend-proje:latest