-
Notifications
You must be signed in to change notification settings - Fork 14
44 lines (42 loc) · 1.46 KB
/
release.yaml
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
name: theta-client update documents on release
on:
release:
types: [released]
jobs:
update_kdoc:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v3
with:
path: main
ref: ${{ github.event.release.tag_name }}
- name: Checkout gh-pages
uses: actions/checkout@v3
with:
path: gh-pages
ref: gh-pages
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
- name: Setup for build
run: |
rm -rf ${{ github.workspace }}/gh-pages/docs
if [ -e ${{ github.workspace }}/gh-pages/version/${{ github.event.release.name }} ]; then
rm -rf ${{ github.workspace }}/gh-pages/version/${{ github.event.release.name }}
fi
- name: Build
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: dokkaHtml -Pversion=${{ github.event.release.name }} -Pworkspace=${{ github.workspace }}
build-root-directory: ${{ github.workspace }}/main
- name: Push to GitHub pages
run: |
cd ${{ github.workspace }}/gh-pages
git config --local user.email github-actions
git config --local user.name [email protected]
git add .
git commit -m "Release version ${{ github.event.release.name }}"
git push origin gh-pages