Files
thoughts/.gitea/workflows/deploy.yml
Gabriel Kaszewski 84f2423343
All checks were successful
Build and Deploy Thoughts / build-and-deploy-local (push) Successful in 6s
feat: add step to dump environment variables for debugging
2025-09-09 01:59:50 +02:00

41 lines
1.3 KiB
YAML

name: Build and Deploy Thoughts
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-deploy-local:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Create .env file
run: |
echo "POSTGRES_USER=${{ secrets.POSTGRES_USER }}" >> .env
echo "POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}" >> .env
echo "POSTGRES_DB=${{ secrets.POSTGRES_DB }}" >> .env
echo "AUTH_SECRET=${{ secrets.AUTH_SECRET }}" >> .env
echo "NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}" >> .env
- name: Dump Environment Variables for Debugging
run: |
echo "--- All available environment variables ---"
env | sort
- name: Build Docker Images Manually
run: |
docker build --target runtime -t thoughts-backend:latest ./thoughts-backend
docker build --target release -t thoughts-frontend:latest --build-arg NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }} ./thoughts-frontend
docker build -t custom-proxy:latest ./nginx
- name: Deploy with Docker Compose
run: |
# Use "up" without --build, as images are already built
docker compose -f compose.prod.yml up -d
docker image prune -f