[build] bump gradle to gradle-9.5.0-rc-2 #892
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: Deploy Hugo site to Pages | |
| on: | |
| push: | |
| branches: [ 'master' ] | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| attestations: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| # Default to bash | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| env: | |
| HUGO_CACHEDIR: /tmp/hugo_cache | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout source code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true # Fetch Hugo themes (true OR recursive) | |
| fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
| - name: Configure GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v6.0.0 | |
| - name: Read .env | |
| id: env | |
| run: | | |
| . ./.env | |
| echo "HUGO_VERSION=${HUGO_VERSION}" >> "${GITHUB_OUTPUT}" | |
| echo "JVM_VERSION=${JVM_VERSION}" >> "${GITHUB_OUTPUT}" | |
| - name: Install Dart Sass Embedded | |
| run: sudo snap install dart-sass-embedded | |
| - name: set up node | |
| uses: actions/setup-node@v6.3.0 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| cache-dependency-path: 'docs/package-lock.json' | |
| - name: Set up JDK (for dokka) | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '${{ steps.env.outputs.JVM_VERSION }}' | |
| distribution: 'adopt' | |
| cache: 'gradle' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3.0.0 | |
| with: | |
| hugo-version: '${{ steps.env.outputs.HUGO_VERSION }}' | |
| extended: true | |
| - name: Generate documentation | |
| shell: bash | |
| run: | | |
| ./gradlew :dokkaGenerate | |
| - name: Copy output to static directory | |
| shell: bash | |
| run: | | |
| cp -a build/dokka/html docs/static/api/ | |
| - name: set up cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ env.HUGO_CACHEDIR }} | |
| key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-hugomod- | |
| - name: Build with Hugo | |
| env: | |
| # For maximum backward compatibility with Hugo modules | |
| HUGO_ENVIRONMENT: production | |
| HUGO_ENV: production | |
| run: | | |
| cd docs | |
| npm clean-install | |
| hugo \ | |
| --minify \ | |
| --baseURL "${{ steps.pages.outputs.base_url }}/" | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4.0.0 | |
| with: | |
| path: './docs/public' | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| env: | |
| HUGO_CACHEDIR: /tmp/hugo_cache | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |