Skip to content

Feature/201903153 최효재 CRUD 과제제출 #6

Feature/201903153 최효재 CRUD 과제제출

Feature/201903153 최효재 CRUD 과제제출 #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: Deployment
on:
workflow_dispatch:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
<<<<<<< HEAD

Check failure on line 24 in .github/workflows/deployment_scp.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deployment_scp.yml

Invalid workflow file

You have an error in your yaml syntax on line 24
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
=======
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
>>>>>>> origin/feature/201903153
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
- uses: actions/upload-artifact@v3
with:
name: jar
path: build/libs
send-jar:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download jar
uses: actions/download-artifact@v3
with:
name: jar
- name: Send jar to remote server
uses: appleboy/scp-action@master
with:
<<<<<<< HEAD
host: 34.22.85.38
username: hyojae5945
source: "devlog_springboot-0.0.1-SNAPSHOT.jar"
target: "/home/hyojae5945"
=======
host: {나의 public ip}
username: {나의 userName}
source: "devlog_springboot-0.0.1-SNAPSHOT.jar"
target: "/home/{나의 userName}"
>>>>>>> origin/feature/201903153
key: ${{ secrets.PRIVATE_KEY }}
run-app:
needs: send-jar
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Move deploy.sh
uses: appleboy/scp-action@master
with:
<<<<<<< HEAD
host: 34.22.85.38
username: hyojae5945
source: "deploy.sh"
target: "/home/hyojae5945"
=======
host: {나의 public ip}
username: {나의 userName}
source: "deploy.sh"
target: "/home/{나의 userName}"
>>>>>>> origin/feature/201903153
key: ${{ secrets.PRIVATE_KEY }}
- name: Execute script
uses: appleboy/ssh-action@master
with:
<<<<<<< HEAD
username: hyojae5945
host: 34.22.85.38
key: ${{ secrets.PRIVATE_KEY }}
script_stop: true
script: cd /home/hyojae5945 && chmod +x deploy.sh && ./deploy.sh
=======
username: {나의 userName}
host: {나의 public ip}
key: ${{ secrets.PRIVATE_KEY }}
script_stop: true
script: cd /home/{나의 userName} && chmod +x deploy.sh && ./deploy.sh
>>>>>>> origin/feature/201903153