Skip to content

Commit 4046716

Browse files
committed
Setup github docs workflows
1 parent 6562ca1 commit 4046716

File tree

3 files changed

+59
-3
lines changed

3 files changed

+59
-3
lines changed

.github/workflows/docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Grace Doc
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- 'docs/**'
8+
jobs:
9+
# Build job
10+
build:
11+
permissions:
12+
contents: read # to fetch code (actions/checkout)
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
java: ['11']
17+
steps:
18+
- name: Checkout repository
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
uses: actions/checkout@v4
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
- name: Setup JDK
25+
uses: actions/setup-java@v4
26+
with:
27+
distribution: 'adopt'
28+
java-version: ${{ matrix.java }}
29+
- name: Get the current version
30+
id: current_version
31+
run: |
32+
echo "$(cat gradle.properties | grep 'projectVersion=' | awk '{print $1}')" >> "$GITHUB_OUTPUT"
33+
- name: Setup Gradle
34+
uses: gradle/actions/setup-gradle@v4
35+
- name: Generate Docs
36+
id: build
37+
run: ./gradlew docs
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: rainboyan/deploy-github-pages@v1.1.0
41+
env:
42+
VERSION: ${{ steps.current_version.outputs.projectVersion }}
43+
TOKEN: ${{ secrets.GH_TOKEN }}
44+
BRANCH: gh-pages
45+
FOLDER: build/docs

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/checkout@v4
2525
with:
2626
token: ${{ secrets.GITHUB_TOKEN }}
27-
- name: Set up JDK
27+
- name: Setup JDK
2828
uses: actions/setup-java@v4
2929
with:
3030
distribution: 'adopt'
@@ -48,7 +48,7 @@ jobs:
4848
uses: actions/checkout@v4
4949
with:
5050
token: ${{ secrets.GITHUB_TOKEN }}
51-
- name: Set up JDK 11
51+
- name: Setup JDK
5252
uses: actions/setup-java@v4
5353
with:
5454
distribution: 'adopt'

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
token: ${{ secrets.GITHUB_TOKEN }}
3939
- uses: gradle/wrapper-validation-action@v2
40-
- name: Set up JDK
40+
- name: Setup JDK
4141
uses: actions/setup-java@v4
4242
with:
4343
distribution: 'adopt'
@@ -52,6 +52,17 @@ jobs:
5252
- name: Set the current release version
5353
id: release_version
5454
run: echo "release_version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
55+
- name: Generate Docs
56+
id: build
57+
run: ./gradlew docs
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: rainboyan/deploy-github-pages@v1.1.0
61+
env:
62+
VERSION: ${{ steps.release_version.outputs.release_version }}
63+
TOKEN: ${{ secrets.GH_TOKEN }}
64+
BRANCH: gh-pages
65+
FOLDER: build/docs/manual
5566
- name: Generate secring file
5667
id: secring
5768
env:

0 commit comments

Comments
 (0)