Skip to content

Commit

Permalink
Move: project directory
Browse files Browse the repository at this point in the history
  • Loading branch information
5jisoo committed Jan 20, 2024
1 parent ee00db9 commit cc88274
Show file tree
Hide file tree
Showing 110 changed files with 13 additions and 21 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to Amazon EC2
on:
push:
branches:
- develop-mysql
- hotfix/spring-restdocs-cicd

# 본인이 설정한 값을 여기서 채워넣습니다.
# 리전, 버킷 이름, CodeDeploy 앱 이름, CodeDeploy 배포 그룹 이름
Expand All @@ -12,13 +12,7 @@ env:
S3_BUCKET_NAME: pochak-github-actions-s3-bucket
CODE_DEPLOY_APPLICATION_NAME: pochakapp-codedeploy
CODE_DEPLOY_DEPLOYMENT_GROUP_NAME: pochak-develop_instance

PROJECT_NAME: pochak-develop
RESOURCE_PATH: ./pochak/src/main/resources


permissions:
contents: read

jobs:
deploy:
Expand All @@ -35,33 +29,31 @@ jobs:

# 설정파일
- name: add api key file
run: echo "${{ secrets.DEV_API_KEY }}" > /home/runner/work/2023-POCHAK-server/2023-POCHAK-server/pochak/src/main/resources/application-API-KEY.properties
run: echo "${{ secrets.DEV_API_KEY }}" > ./src/main/resources/application-API-KEY.properties
shell: bash

- name: add jwt file
run: echo "${{ secrets.DEV_JWT }}" > /home/runner/work/2023-POCHAK-server/2023-POCHAK-server/pochak/src/main/resources/application-JWT.properties
run: echo "${{ secrets.DEV_JWT }}" > ./src/main/resources/application-JWT.properties
shell: bash

- name: add oauth file
run: echo "${{ secrets.DEV_OAUTH }}" > /home/runner/work/2023-POCHAK-server/2023-POCHAK-server/pochak/src/main/resources/application-OAUTH.properties
run: echo "${{ secrets.DEV_OAUTH }}" > ./src/main/resources/application-OAUTH.properties
shell: bash

- name: add test setting file
run: echo "${{ secrets.DEV_TEST }}" > /home/runner/work/2023-POCHAK-server/2023-POCHAK-server/pochak/src/test/resources/application-TEST.properties
run: echo "${{ secrets.DEV_TEST }}" > ./src/test/resources/application-TEST.properties
shell: bash

- name: add authkey file
run: echo "${{ secrets.DEV_AUTHKEY }}" > /home/runner/work/2023-POCHAK-server/2023-POCHAK-server/pochak/src/main/resources/static/AuthKey_D5ZQTHUQ4K.p8
run: echo "${{ secrets.DEV_AUTHKEY }}" > ./src/main/resources/static/AuthKey_D5ZQTHUQ4K.p8
shell: bash

- name: gradlew에 실행 권한 부여
run: chmod +x ./pochak/gradlew
run: chmod +x ./gradlew
shell : bash

- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
build-root-directory: /home/runner/work/2023-POCHAK-server/2023-POCHAK-server/pochak
run: ./gradlew build test

- name: Make zip file
run: zip -qq -r ./$GITHUB_SHA.zip .
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ TIME_NOW=$(date +%c)

# build 파일 복사
echo "$TIME_NOW > $JAR_PATH 확인" >> $DEPLOY_LOG
JAR_NAME=$(ls $PROJECT_ROOT/pochak/build/libs/ | grep 'SNAPSHOT.jar' | tail -n 1)
JAR_PATH=$PROJECT_ROOT/pochak/build/libs/$JAR_NAME
JAR_NAME=$(ls $PROJECT_ROOT/build/libs/ | grep 'SNAPSHOT.jar' | tail -n 1)
JAR_PATH=$PROJECT_ROOT/build/libs/$JAR_NAME

CURRENT_PID=$(pgrep -f $JAR_NAME)

Expand Down
4 changes: 2 additions & 2 deletions scripts/stop.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

PROJECT_ROOT="/home/ubuntu/pochakapp"
JAR_FILE="$PROJECT_ROOT/pochak/build/libs/pochak-0.0.1-SNAPSHOT.jar"
JAR_ROOT="$PROJECT_ROOT/pochak/build/libs/"
JAR_FILE="$PROJECT_ROOT/build/libs/pochak-0.0.1-SNAPSHOT.jar"
JAR_ROOT="$PROJECT_ROOT/build/libs/"

DEPLOY_LOG="$PROJECT_ROOT/deploy.log"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes

0 comments on commit cc88274

Please sign in to comment.