Skip to content

Commit a57be5d

Browse files
committed
Setup docs workflow
Closes gh-1079
1 parent ba9b756 commit a57be5d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/docs.yml

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

0 commit comments

Comments
 (0)