Merge pull request #309 from Pseudo-Lab/refactor/getcloser/frontend/rโฆ #85
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 GetCloser | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'getcloser/**' | |
| - '.github/workflows/deploy-getcloser.yml' | |
| workflow_dispatch: | |
| # ๊ฐ์ ๋ธ๋์น ๋์ ์คํ ์ ์ด์ ์ก ์ทจ์(๊ฒฝ์ ๋ฐฐํฌ ๋ฐฉ์ง) | |
| concurrency: | |
| group: cert-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ======================================== | |
| # ๐ Deploy GetCloser Service | |
| # ======================================== | |
| deploy-prod: | |
| if: github.ref_name == 'main' | |
| name: ๐ Deploy GetCloser | |
| runs-on: oracle | |
| environment: getcloser | |
| defaults: | |
| run: | |
| working-directory: ./getcloser | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Create .env file for PROD | |
| run: | | |
| set -e | |
| echo "DB_USER=${{ secrets.DB_USER }}" > .env | |
| echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .env | |
| echo "DB_DATABASE=${{ vars.DB_DATABASE }}" >> .env | |
| echo "APP_HOST=${{ vars.APP_HOST }}" >> .env | |
| echo "TEAM_SIZE=${{ vars.TEAM_SIZE}}" >> .env | |
| echo "PENDING_TIMEOUT_MINUTES=${{ vars.PENDING_TIMEOUT_MINUTES}}" >> .env | |
| echo "DATA_DIR_HOST=${{ vars.DATA_DIR_HOST }}" >> .env | |
| - name: ๐ Deploy to PROD | |
| run: | | |
| docker compose -f docker-compose.yaml -p getcloser-${{ github.ref_name }} down --remove-orphans || true | |
| docker compose -f docker-compose.yaml -p getcloser-${{ github.ref_name }} up -d --build |