forked from Aliucord/Aliucord
-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (39 loc) · 1.25 KB
/
generate-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
name: Dokka
on:
push:
branches:
- main
paths:
- .github/workflows/generate-dokka.yml
- Aliucord/**
jobs:
dokka:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Generate Dokka
run: |
chmod +x ./gradlew
./gradlew Aliucord:dokkaHtml
./gradlew Aliucord:dokkaJavadoc
- name: Push Dokka
shell: bash # GLOBIGNORE is a special bash variable so explicitly target bash
env:
API_TOKEN: ${{ secrets.API_PAT_GITHUB }}
USERNAME: Github-Actions
REPO: Aliucord/dokka
run: |
git config --global user.name "$USERNAME"
git config --global user.email [email protected]
git clone https://$USERNAME:[email protected]/$REPO.git
cd dokka
GLOBIGNORE=README.md:.git # do not glob README and .git
rm -rf *
cp -r ../Aliucord/build/dokka/* .
git add .
git commit -m "Generate dokka for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" || exit 0
git push https://$USERNAME:[email protected]/$REPO.git