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