Skip to content

Merge pull request #26 from 9oormthon-univ/feat/#24 #13

Merge pull request #26 from 9oormthon-univ/feat/#24

Merge pull request #26 from 9oormthon-univ/feat/#24 #13

Workflow file for this run

name: CI/CD
on:
push:
branches: [ "dev" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Ensure resource directory exists
run: mkdir -p ./src/main/resources
- name: injection-application.yml
run: echo -E "${{ secrets.APPLICATION_YML }}" > ./src/main/resources/application.yml
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Execute Gradle build and analyze
run: ./gradlew jib
- name: Run scripts in server
uses: appleboy/ssh-action@master
with:
key: ${{ secrets.PRIVATE_KEY }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
script: ${{ secrets.DEPLOY_SCRIPT }}