-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (37 loc) · 1.29 KB
/
gh-docs.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
name: Update gh-pages
on:
workflow_run:
workflows: [ Java CI ]
types: [ completed ]
branches: [ main ]
jobs:
generate-docs-reports:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Grant execute permission for mvnw
run: chmod +x mvnw
- name: Export project version
run: echo "PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Run tests and Generate reports
run: ./mvnw --no-transfer-progress --batch-mode test site
- name: Deploy maven reports to GitHub Pages as current version
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
branch: gh-pages
clean: true
folder: target/site
target-folder: docs/${{ env.PROJECT_VERSION }}/site
- name: Deploy maven reports to GitHub Pages as latest version
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
branch: gh-pages
clean: true
folder: target/site
target-folder: docs/latest/site