happybell80 56eaf8c9b5 Initial nginx-infra setup with GitOps deployment
- Add GitHub Actions CI/CD pipeline
- Configure Nginx reverse proxy for robeing services
- Setup docker-compose for full stack deployment
- Include health checks for all services
- Support for PostgreSQL and Redis data persistence

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 21:52:52 +09:00

44 lines
1.2 KiB
YAML

name: Deploy Nginx
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Nginx
uses: docker/build-push-action@v5
with:
context: ./nginx
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/robeing-nginx:latest
${{ secrets.DOCKER_USERNAME }}/robeing-nginx:${{ github.sha }}
- name: Update docker-compose.yml
run: |
sed -i "s|image: .*/robeing-nginx:.*|image: ${{ secrets.DOCKER_USERNAME }}/robeing-nginx:${{ github.sha }}|g" docker-compose.yml
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docker-compose.yml
git commit -m "Update nginx image to ${{ github.sha }}" || exit 0
git push