-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.15 KB
/
server.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
name: server
on:
workflow_dispatch:
push:
branches:
- develop
paths:
- "backend/**"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend/memetory
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- run : echo -E "${{ secrets.DEV_YML }}" > ./src/main/resources/application-dev.yml
- run : echo -E "${{ secrets.FIREBASE_KEY }}" > ./src/main/resources/firebase/firebase_key.json
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_ID }}
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.KEY }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USER_NAME }}
script: ${{ secrets.SCRIPT }}