-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 1.56 KB
/
maven-ci.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
58
name: Github CI
on: [ push, pull_request ]
env:
MAVEN_OPTS: -Dmaven.artifact.threads=256 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
build:
name: Main Build
runs-on: ubuntu-20.04
steps:
- name: Clone
id: clone
uses: actions/checkout@v4
- name: Set up JDK 21
id: java21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: Build
run: mvn package -e
- name: Remove Snapshots Before Caching
run: find ~/.m2/repository -name '*SNAPSHOT' | xargs rm -Rf
deploy-doc:
if: github.ref == 'refs/heads/main'
name: Documentation
runs-on: ubuntu-20.04
permissions:
pages: write
id-token: write
environment:
name: github-pages
steps:
- name: Clone
id: clone
uses: actions/checkout@v4
- name: Set up JDK 21
id: java21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: Deploy-Documentation
run: mvn package -s .github/settings.xml -Pgh-pages -e -DskipTests
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- uses: actions/[email protected]
with:
path: target/__site
- id: deployment
uses: actions/[email protected]
- name: Remove Snapshots Before Caching
run: find ~/.m2/repository -name '*SNAPSHOT' | xargs rm -Rf