Skip to content

Commit

Permalink
Merge pull request #274 from Hous-Release/develop
Browse files Browse the repository at this point in the history
release 1.0.0
  • Loading branch information
hyejungg committed Dec 16, 2022
2 parents 0701e9a + 6d56bab commit 90a8481
Show file tree
Hide file tree
Showing 235 changed files with 8,586 additions and 484 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This is a basic workflow to help you get started with Actions

name: deploy-dev

# Controls when the workflow will run
on:
push:
branches: [ develop ]

env:
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME_DEV }}

jobs:
build:
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v3

- name: create secret files
working-directory: ./src/main/resources
run: |
touch application.yml
touch application-dev.yml
echo "${{ secrets.APPLICATION_YML }}" >> application.yml
echo "${{ secrets.APPLICATION_DEV_YML }}" >> application-dev.yml
mkdir firebase
touch ./firebase/firebase_service_key.json
echo "${{ secrets.FIREBASE_SERVICE_KEY_JSON }}" >> ./firebase/firebase_service_key.json
sed -i 's/#/"/g' ./firebase/firebase_service_key.json
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '11'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
shell: bash

# - name: Test with Gradle
# run: ./gradlew test

- name: Build with Gradle
run: ./gradlew build -x test
shell: bash

- name: Make zip file
run: zip -r ./code-deploy.zip .
shell: bash

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY_DEV }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_KEY_DEV }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./code-deploy.zip s3://$AWS_S3_BUCKET_NAME/code-deploy.zip

- name: Code Deploy
run: aws deploy create-deployment
--application-name hous-codedeploy
--deployment-config-name CodeDeployDefault.OneAtATime
--deployment-group-name GROUP
--s3-location bucket=$AWS_S3_BUCKET_NAME,bundleType=zip,key=code-deploy.zip
70 changes: 70 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This is a basic workflow to help you get started with Actions

name: deploy-prod

# Controls when the workflow will run
on:
push:
branches: [ main ]

env:
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME_PROD }}

jobs:
build:
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v3

- name: create secret files
working-directory: ./src/main/resources
run: |
touch application.yml
touch application-prod.yml
echo "${{ secrets.APPLICATION_YML }}" >> application.yml
echo "${{ secrets.APPLICATION_PROD_YML }}" >> application-prod.yml
mkdir firebase
touch ./firebase/firebase_service_key.json
echo "${{ secrets.FIREBASE_SERVICE_KEY_JSON }}" >> ./firebase/firebase_service_key.json
sed -i 's/#/"/g' ./firebase/firebase_service_key.json
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '11'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
shell: bash

# - name: Test with Gradle
# run: ./gradlew test

- name: Build with Gradle
run: ./gradlew build -x test
shell: bash

- name: Make zip file
run: zip -r ./code-deploy.zip .
shell: bash

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY_PROD }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_KEY_PROD }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./code-deploy.zip s3://$AWS_S3_BUCKET_NAME/code-deploy.zip

- name: Code Deploy
run: aws deploy create-deployment
--application-name hous-codedeploy
--deployment-config-name CodeDeployDefault.OneAtATime
--deployment-group-name API
--s3-location bucket=$AWS_S3_BUCKET_NAME,bundleType=zip,key=code-deploy.zip
97 changes: 0 additions & 97 deletions .github/workflows/deploy.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/pr-check-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This is a basic workflow to help you get started with Actions

name: pr-check-dev

# Controls when the workflow will run
on:
pull_request:
branches: [ develop ]

jobs:
build:
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v3

- name: create secret files
working-directory: ./src/main/resources
run: |
touch application.yml
touch application-dev.yml
echo "${{ secrets.APPLICATION_YML }}" >> application.yml
echo "${{ secrets.APPLICATION_DEV_YML }}" >> application-dev.yml
mkdir firebase
touch ./firebase/firebase_service_key.json
echo "${{ secrets.FIREBASE_SERVICE_KEY_JSON }}" >> ./firebase/firebase_service_key.json
sed -i 's/#/"/g' ./firebase/firebase_service_key.json
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '11'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
shell: bash

# - name: Test with Gradle
# run: ./gradlew test

- name: Build with Gradle
run: ./gradlew build -x test
shell: bash
46 changes: 46 additions & 0 deletions .github/workflows/pr-check-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This is a basic workflow to help you get started with Actions

name: pr-check-prod

# Controls when the workflow will run
on:
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v3

- name: create secret files
working-directory: ./src/main/resources
run: |
touch application.yml
touch application-prod.yml
echo "${{ secrets.APPLICATION_YML }}" >> application.yml
echo "${{ secrets.APPLICATION_PROD_YML }}" >> application-prod.yml
mkdir firebase
touch ./firebase/firebase_service_key.json
echo "${{ secrets.FIREBASE_SERVICE_KEY_JSON }}" >> ./firebase/firebase_service_key.json
sed -i 's/#/"/g' ./firebase/firebase_service_key.json
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '11'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
shell: bash

# - name: Test with Gradle
# run: ./gradlew test

- name: Build with Gradle
run: ./gradlew build -x test
shell: bash
Loading

0 comments on commit 90a8481

Please sign in to comment.