-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from depromeet/refact/infra
refact: 개발망 운영망 분기
- Loading branch information
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: DEV Api CI/CD | ||
|
||
on: | ||
push: | ||
branches: [ "develop" ] | ||
paths-ignore: | ||
- 'application/admin/**' # application/admin 폴더 내의 변화 무시 | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: setup jdk 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: build with gradle | ||
run: ./gradlew bootJar | ||
|
||
- name: push to dockerhub | ||
run: | | ||
docker login -u ${{ secrets.DOCKER_ID }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
docker build --no-cache -t ${{ secrets.DOCKER_ID }}/${{ secrets.DOCKER_REPO_PATH }}:${{secrets.DOCKER_TAG_DEV}} -f ./application/api/dev/Dockerfile . | ||
docker push ${{ secrets.DOCKER_ID }}/${{ secrets.DOCKER_REPO_PATH }}:${{secrets.DOCKER_TAG_DEV}} | ||
- name: deploy | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
port: ${{ secrets.SSH_PORT }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
script: | | ||
${{ secrets.SSH_SCRIPT_FOR_API_DEV }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: LIVE Api CI/CD | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
paths-ignore: | ||
- 'application/admin/**' # application/admin 폴더 내의 변화 무시 | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: setup jdk 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: build with gradle | ||
run: ./gradlew bootJar | ||
|
||
- name: push to dockerhub | ||
run: | | ||
docker login -u ${{ secrets.DOCKER_ID }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
docker build --no-cache -t ${{ secrets.DOCKER_ID }}/${{ secrets.DOCKER_REPO_PATH }}:${{secrets.DOCKER_TAG_LIVE}} -f ./application/api/live/Dockerfile . | ||
docker push ${{ secrets.DOCKER_ID }}/${{ secrets.DOCKER_REPO_PATH }}:${{secrets.DOCKER_TAG_LIVE}} | ||
- name: deploy | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
port: ${{ secrets.SSH_PORT }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
script: | | ||
${{ secrets.SSH_SCRIPT }} |