-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.29 KB
/
build-and-deploy.yaml
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
50
51
52
53
54
55
56
57
name: Build and deploy
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${symbol_dollar}{{ runner.os }}-maven-${symbol_dollar}{{ hashFiles('**/pom.xml') }}
restore-keys: |
${symbol_dollar}{{ runner.os }}-maven-
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Build and Test
run: ./mvnw clean verify
- name: Code Quality
uses: codecov/codecov-action@v3
- uses: actions/upload-artifact@v3
with:
name: successful-build
retention-days: 5
path: |
target
deploy:
if: github.event_name == 'push'
needs: [ 'build' ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: successful-build
path: target
- name: Deploy Documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/generated-docs