Merge remote-tracking branch 'origin/develop' into develop #9
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: Deploy Review Project | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: self-hosted # Use runner on EC2 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| clean: false | |
| - name: Create .env from secrets | |
| run: | | |
| cd infra | |
| echo "${{ secrets.ENV_FILE }}" > .env | |
| - name: Create frontend env | |
| run: | | |
| cd View | |
| echo "REACT_APP_API_BASE_URL=${{ secrets.REACT_APP_API_BASE_URL }}" > .env.production | |
| - name: Stop & remove previous containers | |
| run: | | |
| cd infra | |
| docker compose down || true | |
| - name: Build new containers | |
| run: | | |
| cd infra | |
| docker compose build --no-cache | |
| - name: Start containers | |
| run: | | |
| cd infra | |
| docker compose up -d |