-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (39 loc) · 1.14 KB
/
deploy.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
name: Deployment Prod
on: workflow_dispatch
permissions:
contents: read
packages: write
concurrency: prod
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Execute Gradle build with tests
run: ./gradlew build
- name: Build Docker images with gradle
run: ./gradlew imageBuild
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: 'ghcr.io'
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag And Push Docker Images
run: ./deploy_images.sh
- name: triggering deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: ignored