Merge pull request #84 from username056/feat/ai-ocr-integration #63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI/CD Deploy to EC2 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and push Docker image | |
| run: | | |
| docker build -t ${{ secrets.DOCKER_USERNAME }}/yechef-app ./yechef | |
| docker push ${{ secrets.DOCKER_USERNAME }}/yechef-app | |
| - name: Deploy to EC2 via SSH | |
| uses: appleboy/ssh-action@v1.0.0 | |
| with: | |
| host: ${{ secrets.EC2_HOST }} | |
| username: ${{ secrets.EC2_USER }} | |
| key: ${{ secrets.EC2_KEY }} | |
| script: | | |
| docker pull ${{ secrets.DOCKER_USERNAME }}/yechef-app | |
| cd /home/ec2-user/server/yechef | |
| docker compose down | |
| docker compose up -d | |