Skip to content

Commit d5d1847

Browse files
authored
2 parents 0288b95 + 896ad75 commit d5d1847

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [master, develop]
6+
pull_request:
7+
branches: [master, develop]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 11
19+
- name: Build with Gradle
20+
run: chmod +x gradlew && ./gradlew build

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: deploy
2+
3+
on:
4+
workflow_dispatch:
5+
create:
6+
tags: [v*]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
# Build release
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 11
19+
- name: Build app with Gradle
20+
run: chmod +x gradlew && ./gradlew shadowJar
21+
# Download from build to data
22+
- uses: actions/upload-artifact@v2
23+
with:
24+
path: build/libs/*.jar
25+
# Upload from data to production server
26+
- name: Upload app to server
27+
uses: garygrossgarten/[email protected]
28+
with:
29+
host: ${{ secrets.SSH_HOST }}
30+
username: ${{ secrets.SSH_USER }}
31+
password: ${{ secrets.SSH_PASS }}
32+
port: ${{ secrets.SSH_PORT }}
33+
local: "build/libs"
34+
remote: "bots/similar-images-bot"

0 commit comments

Comments
 (0)