Refactor: 가입로직 수정 완료 #63
This file contains 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: DEVELOP-CICD | |
on: | |
push: | |
branches: [develop] | |
jobs: | |
Build_and_Test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18.18.2 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{ secrets.RELEASE_S3_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.RELEASE_S3_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.S3_REGION }} | |
- name: Download Test Environment file from S3 and Check | |
run: aws s3 cp ${{ secrets.S3_TEST_ENV }} .env | |
- name: Install Dependencies | |
run: npm ci | |
- name: Compile Backend-Server | |
run: npm run build | |
- name: Unit Test | |
run: npm run test:unit | |
- name: Make a zip file | |
run: zip -r ./build.zip . -x "node_modules/*" "coverage/*" "src/*" "test/*" "README.md" "*.git*" "common/*" "tsconfig.json" "tsconfig.build.json" "nest-cli.json" "*.env" | |
shell: bash | |
- name: Upload build to artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifact | |
path: ./build.zip | |
# Deploy: | |
# name: Deploy | |
# runs-on: ubuntu-latest | |
# needs: Build_and_Test | |
# steps: | |
# - name: Download build artifact | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: build-artifact | |
# path: . | |
# - name: Dynamically set MY_DATE environment variable | |
# run: echo "MY_DATE=$(date +%Y%m%d-%H%M)" >> $GITHUB_ENV | |
# - name: Configure AWS credentials | |
# uses: aws-actions/configure-aws-credentials@v2 | |
# with: | |
# aws-access-key-id: ${{ secrets.S3_ACCESS_KEY }} | |
# aws-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }} | |
# aws-region: ${{ secrets.S3_REGION }} | |
# - name: Upload to S3 | |
# run: aws s3 cp --region ${{ secrets.S3_REGION }} ./build.zip s3://${{secrets.S3_BUCKET_NAME}}/${{secrets.S3_FOLDER_NAME}}/${{ env.MY_DATE }}.zip | |
# - name: Code Deploy | |
# run: aws deploy create-deployment | |
# --application-name ${{secrets.S3_CODEDEPLOY_APPLICATION_NAME}} | |
# --deployment-config-name CodeDeployDefault.AllAtOnce | |
# --deployment-group-name ${{secrets.S3_CODEDEPLOY_DEPLOYMENT_GROUP_NAME}} | |
# --s3-location bucket=${{secrets.S3_BUCKET_NAME}},bundleType=zip,key=${{secrets.S3_FOLDER_NAME}}/${{ env.MY_DATE }}.zip |