-
Notifications
You must be signed in to change notification settings - Fork 39
73 lines (62 loc) · 1.88 KB
/
Dokka.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Generate Dokka
concurrency:
group: "Generate Dokka"
cancel-in-progress: true
on:
push:
branches:
- master
paths-ignore:
- '*.md'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout App Repository
uses: actions/checkout@master
with:
path: "Flixclusive"
- name: Generate access token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_KEY }}
owner: Flixclusive
repositories: |
api
- name: Checkout API Reference Repository
uses: actions/checkout@master
with:
repository: 'Flixclusive/api'
path: 'api'
token: ${{ steps.generate_token.outputs.token }}
- name: Setup Android SDK
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3"
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Reset Dokka
run: |
cd $GITHUB_WORKSPACE/api/
rm -rf *
- name: Generate New Dokka
run: |
cd $GITHUB_WORKSPACE/Flixclusive/
chmod +x gradlew
./gradlew --no-build-cache --no-configuration-cache :dokkaHtmlMultiModule
- name: Update Dokka
run: |
cp -r $GITHUB_WORKSPACE/Flixclusive/build/dokka/htmlMultiModule/* $GITHUB_WORKSPACE/api/
- name: Push builds
run: |
cd $GITHUB_WORKSPACE/api
touch .nojekyll
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add .
git commit -m "docs(dokka): update API references [rhenwinch/Flixclusive@${GITHUB_SHA}]" || exit 0
git push