Skip to content

refactor: Note 관련 api 스웨거 명세 추가 (#77) (#81) (#82) #6

refactor: Note 관련 api 스웨거 명세 추가 (#77) (#81) (#82)

refactor: Note 관련 api 스웨거 명세 추가 (#77) (#81) (#82) #6

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ "develop" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
## create application.yml
- name: make application.yml
run: |
## create application.yml
mkdir src/main/resources
cd ./src/main/resources
# application.properties 파일 생성
touch ./application.yml
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기
echo "${{ secrets.APPLICATION }}" >> ./application.yml
shell: bash
## Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
## gradle build
- name: Build with Gradle
run: ./gradlew bootJar
## 웹 이미지 빌드 및 도커허브에 push
- name: web docker build and push
run: |
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
## docker tag ${{ secrets.DOCKERHUB_USERNAME }} ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKER_REPO_WEB }}
docker build -t ryulkim/umc-notation-web .
docker push ryulkim/umc-notation-web
## docker compose up
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ubuntu
key: ${{ secrets.KEY }}
script: |
## docker-compose.yml 파일 생성
touch ./docker-compose.yml
echo "${{secrets.COMPOSE}}" > ./docker-compose.yml
## sudo docker rm -f $(sudo docker ps -qa)
sudo docker pull ryulkim/umc-notation-web
sudo docker pull ryulkim/umc-notation-nginx
sudo docker-compose up -d
sudo docker image prune -f