-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (42 loc) · 1.37 KB
/
ci.yml
File metadata and controls
50 lines (42 loc) · 1.37 KB
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
name: Java CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
MAILER_APIKEY: ''
NOTIF_FROM: ''
NOTIF_TO: ''
JWT_SECRET: ''
# Allow the workflow to publish_branch
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'corretto'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
- name: Upload coverage report to Codacy
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r target/site/jacoco/jacoco.xml
- name: Move index.html file to root dir
run: mv target/site/asciidoc/index.html target/site/
- name: Deploy to GitHub Pages
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/site
publish_branch: gh-pages