forked from 2024-realcoding/devlog_springboot
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 1.49 KB
/
blank.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Deployment
on:
workflow_dispatch:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
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:
host: 34.64.108.151
username: dahyeon215
source: "devlog_springboot-0.0.1-SNAPSHOT.jar"
target: "/home/dahyeon215"
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:
host: 34.64.108.151
username: dahyeon215
source: "deploy.sh"
target: "/home/dahyeon215"
key: ${{ secrets.PRIVATE_KEY }}
- name: Execute script
uses: appleboy/ssh-action@master