From 6c7487e0af4fba7ecc5816b30f5815700daab32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=97=A4=EC=9D=B8?= <157036488+Hain-tain@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:02:15 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=94=84=EB=A1=A0=ED=8A=B8?= =?UTF-8?q?=EC=97=94=EB=93=9C=20cd=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/frontend_cd.yml | 75 ------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 .github/workflows/frontend_cd.yml diff --git a/.github/workflows/frontend_cd.yml b/.github/workflows/frontend_cd.yml deleted file mode 100644 index 7d2abc37c..000000000 --- a/.github/workflows/frontend_cd.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Frontend CD - -on: - push: - branches: - - main - - dev/fe - -jobs: - build: - runs-on: - - self-hosted - - spring - - develop - env: - frontend-directory: ./frontend - steps: - - uses: actions/checkout@v4 - - - name: Node.js 설정 - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: 환경 파일 생성 - run: | - if [ "${{ github.ref_name }}" == "main" ]; then - echo "REACT_APP_API_URL=${{ secrets.REACT_APP_API_URL }}" > ${{ env.frontend-directory }}/.env.production - else - echo "REACT_APP_API_URL=${{ secrets.REACT_APP_BETA_API_URL }}" > ${{ env.frontend-directory }}/.env.production - fi - - echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> ${{ env.frontend-directory }}/.env.production - echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> ${{ env.frontend-directory }}/.env.sentry-build-plugin - - - name: 환경 파일 권한 설정 - run: chmod 644 ${{ env.frontend-directory }}/.env.* - - - name: 의존성 설치 - run: npm install - working-directory: ${{ env.frontend-directory }} - - - name: 빌드 실행 - run: npm run build - working-directory: ${{ env.frontend-directory }} - - - name: 아티팩트 업로드 - uses: actions/upload-artifact@v4 - with: - name: code-zap-front - path: ${{ env.frontend-directory }}/dist/** - - deploy: - needs: build - runs-on: - - self-hosted - - spring - - develop - steps: - - name: 아티팩트 디렉토리 생성 - run: | - rm -rf ${{ secrets.FRONT_DIRECTORY }} - mkdir ${{ secrets.FRONT_DIRECTORY }} - - name: 아티팩트 다운로드 - uses: actions/download-artifact@v4 - with: - name: code-zap-front - path: ${{ secrets.FRONT_DIRECTORY }} - - name: S3로 이동 - run: | - if [ "${{ github.ref_name }}" == "main" ]; then - aws s3 cp --recursive ${{ secrets.FRONT_DIRECTORY }} s3://techcourse-project-2024/code-zap - else - aws s3 cp --recursive ${{ secrets.FRONT_DIRECTORY }} s3://techcourse-project-2024/code-zap-staging - fi