-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (38 loc) · 966 Bytes
/
server_cicd.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
# .github/workflows/ci-cd.yml
name: server CI/CD Pipeline
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
path: server
- name: Print working directory
run: pwd
- name: Clear Gradle cache
run: |
rm -rf ~/.gradle/caches
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: '8.8'
build-root-directory: server
- name: Run chmod to make gradlew executable
working-directory: ./server
run: chmod +x server/gradlew
- name: Build with Gradle
working-directory: ./server
run: server/gradlew build -x test
- name: Deploy
if: success()
run: echo "Deploy your application here"