-
Notifications
You must be signed in to change notification settings - Fork 20
41 lines (34 loc) · 1.12 KB
/
fly-deploy-dev.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
name: Deploy Server - Dev
on:
push:
branches:
- development
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "temurin" # See 'Supported distributions' for available options
java-version: "11"
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
- name: Run Tests
run: ./gradlew test
- name: Build JAR with Gradle
run: ./gradlew jar && mkdir target && mv build/libs/secret-hitler-online.jar target/secret-hitler-online.jar --force
- name: Replace standard Dockerfile with debug version
run: rm ./Dockerfile && cp ./config/Dockerfile.dev ./Dockerfile
- name: Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy to Fly
run: flyctl deploy -a "secret-hitler-online-dev" --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_DEV }}