Files
HarunCAN_Studio_FE/.gitea/workflows/deploy-ui.yml
2026-03-03 19:26:22 +03:00

37 lines
1.2 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: UI Deploy (Next-Auth Support) 🎨
run-name: ${{ gitea.actor }} frontend 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
# Tarayıcı tarafında (Client-side) lazım olanları build anında veriyoruz
run: |
docker build \
--build-arg NEXT_PUBLIC_API_URL='${{ secrets.NEXT_PUBLIC_API_URL }}' \
--build-arg NEXT_PUBLIC_AUTH_REQUIRED='${{ secrets.NEXT_PUBLIC_AUTH_REQUIRED }}' \
--build-arg NEXT_PUBLIC_GOOGLE_API_KEY='${{ secrets.NEXT_PUBLIC_GOOGLE_API_KEY }}' \
-t frontend-proje:latest .
- name: Eski Konteyneri Sil
run: docker rm -f frontend-container || true
- name: Yeni Versiyonu Başlat
# Sunucu tarafında (Server-side/Auth) lazım olanları run anında veriyoruz
run: |
docker run -d \
--name frontend-container \
--restart always \
--network gitea-server_gitea \
-p 1800:3000 \
-e NEXTAUTH_SECRET='${{ secrets.NEXTAUTH_SECRET }}' \
-e NEXTAUTH_URL='${{ secrets.NEXTAUTH_URL }}' \
frontend-proje:latest