-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.08 KB
/
docs.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
name: Deploy documentation
on:
pull_request:
push:
branches:
- 'main'
paths:
- 'docs/**'
jobs:
build-publish:
name: build-move-deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 13
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Build with Maven
run: mvn clean package --projects :docs --also-make --batch-mode -Pbuild-docs
- name: Move
run: |
mkdir public
mv docs/target/public/index.html public/index.html
- name: Deploy
if: success() && github.event_name != 'pull_request'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}