This repository was archived by the owner on Jan 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
93 lines (91 loc) · 2.45 KB
/
documentation.yml
File metadata and controls
93 lines (91 loc) · 2.45 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: documentation
on:
pull_request:
branches: [develop]
push:
branches: [develop]
jobs:
checks:
if: github.event_name != 'push'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: |
cd docs
yarn
- name: Test Build
run: |
cd docs
yarn build
javadoc:
if: github.event_name != 'pull_request'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: main
- name: Build with Maven
run: mvn clean install javadoc:javadoc
- uses: actions/upload-artifact@v3
with:
name: "JavaDoc"
path: "target/site/apidocs"
javadoc-snapshot:
if: github.event_name != 'pull_request'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Build with Gradle
run: bash ./gradlew javadoc
- uses: actions/upload-artifact@v3
with:
name: "JavaDoc-Snapshot"
path: "build/docs/javadoc"
gh-release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
needs:
- javadoc
- javadoc-snapshot
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
- name: Download javadoc
uses: actions/download-artifact@v3
with:
name: "JavaDoc"
path: docs/static/apidocs
- name: Download javadoc-snapshot
uses: actions/download-artifact@v3
with:
name: "JavaDoc-Snapshot"
path: docs/static/apidocs-snapshot
- name: Release to GitHub Pages
env:
USE_SSH: true
GIT_USER: git
run: |
cd docs
git config --global user.email "actions@github.com"
git config --global user.name "gh-actions"
yarn
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build # The folder the action should deploy.