forked from eclipse-hara/hara-ddiclient
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.07 KB
/
pipeline-kdoc.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
name: kdoc-action
#Triggered when a new tag is pushed
on:
push:
tags:
- '*'
jobs:
generate-doc:
runs-on: ubuntu-latest
steps:
- name: Check repository
uses: actions/checkout@v4
- name: Generate Html documentation
run: ./gradlew dokkaHtml
- name: Override index.html
run: |
echo '<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="0;URL='${{ github.ref_name }}'" />
</head>
<body>
</body>
</html>' > 'index.html'
#Directory with index.html and documentation (only one commit)
- name: Setup publish directory
run: |
mkdir -p latest_doc/${{ github.ref_name }}
mv ./hara-ddiclient-api/build/dokka/html/* latest_doc/${{ github.ref_name }}
mv index.html latest_doc
- name: Setup branch gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./latest_doc
keep_files: true