Skip to content

Merge pull request #193 from Team-HMH/fix/#192-admin-change-challengeโ€ฆ #22

Merge pull request #193 from Team-HMH/fix/#192-admin-change-challengeโ€ฆ

Merge pull request #193 from Team-HMH/fix/#192-admin-change-challengeโ€ฆ #22

Workflow file for this run

name: ๐ŸŽ‰DEV-SERVER-DEPLOY๐ŸŽ‰
on:
push:
branches: [ 'develop' ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
codedeploy-application-name: [ hmh-codedeploy-app ]
deployment-group-name: [ hmh-dev-deploy-group ]
s3-bucket: [ hmh-server-bucket ]
steps:
- name: checkout
uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- name: mkdir resources folder
run: |
mkdir ./src/main/resources
touch ./src/main/resources/application.yml
shell: bash
- name: copy yml file
run: echo "${{ secrets.APPLICATION_DEV_YML }}" > ./src/main/resources/application.yml
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: ๐Ÿˆ Gradle Build
run: ./gradlew clean build
- name: ๐Ÿ“‚ Make zip file
run: zip -r ./$GITHUB_SHA.zip .
- name: ๐Ÿชฃ S3 upload
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: ๐Ÿš€ s3 upload
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://${{matrix.s3-bucket}}/dev/deploy/$GITHUB_SHA.zip
- name: โ˜€๏ธ CodeDeploy~!
run: aws deploy create-deployment
--application-name ${{matrix.codedeploy-application-name}}
--deployment-group-name ${{matrix.deployment-group-name}}
--s3-location bucket=${{matrix.s3-bucket}},bundleType=zip,key=dev/deploy/$GITHUB_SHA.zip
--file-exists-behavior OVERWRITE
--region ap-northeast-2