-
Notifications
You must be signed in to change notification settings - Fork 83
51 lines (40 loc) · 1.32 KB
/
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
47
48
49
50
51
name: Documentation
on:
workflow_dispatch:
push:
branches:
- main
jobs:
docs:
name: Update documentation
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch tags
run: git fetch --prune --unshallow
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material mike
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
- name: Get current Readium version
run: echo "READIUM_VERSION=`git describe --tag --match [0-9]* --abbrev=0`" >> $GITHUB_ENV
- name: Run Dokka
run: ./gradlew dokkaGfmMultiModule
- name: Copy README.md into docs to replace Dokka index.md
run: cp README.md index.md
- name: Run MkDocs
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
mike deploy ${{ env.READIUM_VERSION }}
mike set-default ${{ env.READIUM_VERSION }}
mike deploy --rebase --push --update-aliases ${{ env.READIUM_VERSION }} latest