-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (55 loc) · 2.01 KB
/
documentation.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
47
48
49
50
51
52
53
54
55
name: documentation
on:
release:
types: [published]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: '17'
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install mkdocs and associated plugins
run: pip install \ mkdocs-material \ mkdocs-autorefs \ mkdocs-material-extensions \ mkdocstrings \ mkdocstrings-python \ mkdocs-awesome-pages-plugin \ mkdocs-open-in-new-tab \ mike
- name: Install Python Adapter Library
run: pip install -e lib/python/
- name: Generate Java Adapter Library Documentation
run: |
./lib/java/AdapterLibrary/gradlew -p lib/java/AdapterLibrary dokkaJavadoc
mkdir -p docs/references/java_project/java_lib/
cp -r lib/java/AdapterLibrary/build/dokka/javadoc/* docs/references/java_project/java_lib/
- name: Build MKDocs Site
# If not on the main branch, build the docs to check for errors, but do not deploy
if: github.ref != 'refs/heads/main'
run: mkdocs build
- name: Deploy MKDocs Site
# If on the main branch, deploy the site
if: github.ref == 'refs/heads/main'
run: mkdocs gh-deploy --force --remote-branch github-pages-documentation
- name: Get Release Version
run: |
export VERSION=${{ github.event.release.tag_name }}
- name: Setup documentation user
run: |
git config --global user.name ci-bot
git config --global user.email [email protected]
- name: Deploy MKDocs Site
run: mike deploy -b github-pages-documentation-test --push --update-aliases ${VERSION} latest