-
Notifications
You must be signed in to change notification settings - Fork 15
79 lines (67 loc) · 1.78 KB
/
docs.yml
File metadata and controls
79 lines (67 loc) · 1.78 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
name: docs
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: docs-deploy
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install MkDocs dependencies
run: |
python -m venv .venv
. .venv/bin/activate
python -m pip install -r docs/requirements.txt
- name: Build MkDocs site
run: |
. .venv/bin/activate
python -m mkdocs build --config-file docs/mkdocs.yml --site-dir site
- uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Generate Javadoc
run: mvn --no-transfer-progress compile javadoc:javadoc
- name: Merge Javadoc into site
run: |
mkdir -p site/api
cp -R target/site/apidocs/. site/api/
- name: Upload site artifact
uses: actions/upload-artifact@v4
with:
name: docs-site
path: site
if-no-files-found: error
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download site artifact
uses: actions/download-artifact@v4
with:
name: docs-site
path: site
- name: Deploy combined docs site
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site