Update build scripts #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Grace Doc | |
| on: | |
| push: | |
| branches: | |
| - 2024.0.x | |
| paths: | |
| - 'src/docs/**' | |
| jobs: | |
| # Build job | |
| build: | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: ['17'] | |
| steps: | |
| - name: Checkout repository | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'adopt' | |
| java-version: ${{ matrix.java }} | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3 # v4.4.2 | |
| - name: Get the current version | |
| id: getversion | |
| run: | | |
| echo "$(cat gradle.properties | grep 'projectVersion=' | awk '{print $1}')" >> "$GITHUB_OUTPUT" | |
| - name: Generate Docs | |
| id: build | |
| run: ./gradlew docs | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: rainboyan/[email protected] | |
| env: | |
| VERSION: ${{ steps.getversion.outputs.projectVersion }} | |
| TOKEN: ${{ secrets.GH_TOKEN }} | |
| BRANCH: gh-pages | |
| FOLDER: build/docs/manual |