Skip to content

Commit fa682dd

Browse files
committed
Setup github docs workflows
1 parent 77c2690 commit fa682dd

File tree

3 files changed

+61
-3
lines changed

3 files changed

+61
-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+
- 6.3.x
6+
paths:
7+
- 'src/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: ['17']
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: Set up 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: getversion
31+
run: |
32+
echo "$(cat gradle.properties | grep 'projectVersion=' | awk '{print $1}')" >> "$GITHUB_OUTPUT"
33+
- name: Generate Docs
34+
id: build
35+
uses: gradle/actions/setup-gradle@v3
36+
with:
37+
arguments: docs
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: rainboyan/[email protected]
41+
env:
42+
VERSION: ${{ steps.getversion.outputs.projectVersion }}
43+
TOKEN: ${{ secrets.GH_TOKEN }}
44+
BRANCH: gh-pages
45+
FOLDER: build/docs/manual

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
java-version: ${{ matrix.java }}
3232
- name: Run Build
3333
id: build
34-
uses: gradle/gradle-build-action@v3
34+
uses: gradle/actions/setup-gradle@v3
3535
with:
3636
arguments: build
3737
publish:
@@ -59,7 +59,7 @@ jobs:
5959
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
6060
- name: Publish to Sonatype OSSRH
6161
id: publish
62-
uses: gradle/gradle-build-action@v3
62+
uses: gradle/actions/setup-gradle@v3
6363
env:
6464
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
6565
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

.github/workflows/release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ 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+
uses: gradle/actions/setup-gradle@v3
58+
with:
59+
arguments: docs
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: rainboyan/[email protected]
63+
env:
64+
VERSION: ${{ steps.release_version.outputs.release_version }}
65+
TOKEN: ${{ secrets.GH_TOKEN }}
66+
BRANCH: gh-pages
67+
FOLDER: build/docs/manual
5568
- name: Generate secring file
5669
id: secring
5770
env:
@@ -60,7 +73,7 @@ jobs:
6073
- name: Publish to Sonatype OSSRH
6174
id: publish
6275
if: steps.secring.outcome == 'success'
63-
uses: gradle/gradle-build-action@v3
76+
uses: gradle/actions/setup-gradle@v3
6477
env:
6578
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
6679
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

0 commit comments

Comments
 (0)