forked from zDevelopers/QuartzLib
-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (59 loc) · 2.14 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Generate Javadocs
on:
push:
branches: [master]
jobs:
javadoc:
name: Generate Javadocs
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- name: Validate Gradle
uses: gradle/wrapper-validation-action@v1
- name: Cache Gradle Wrapper and Dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Build Javadoc
run: ./gradlew javadoc --no-daemon
# - name: Checkout website repository
# uses: actions/checkout@v2
# with:
# repository: zDevelopers/zdevelopers.github.io
# path: web
# branch: master
# persist-credentials: false
#- name: Push built documentation to website repository
# shell: bash
# run: |
# # Extract project name
# PROJECT_NAME=${GITHUB_REPOSITORY##*/}
# PROJECT_NAME_LOWER=${PROJECT_NAME,,}
# # Create dir if needed, cleanup old doc and copy new one
# mkdir -p web/static/docs/
# rm -rf web/static/docs/$PROJECT_NAME_LOWER
# cp -r ezlib/target/site/apidocs web/static/docs/$PROJECT_NAME_LOWER
# # Go to website repository
# cd web
# # Configure git to push to this repository
# git config --global user.name QuartzBot
# git config --global user.email moriplay@zcraft.fr
# git config --global user.password ${{ secrets.QUARTZ_BOT_TOKEN }}
# # Add files
# echo ::group::Commit
# git add .
# git commit -m "Updated documentation for $PROJECT_NAME"
# echo ::endgroup::
# # Push
# echo ::group::Push
# git push https://QuartzBot:${{ secrets.QUARTZ_BOT_TOKEN }}@github.com/zDevelopers/zdevelopers.github.io.git
# echo ::endgroup::