Publish #17455
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: Publish | |
| on: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: '0 */2 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| if: github.repository == 'apache/grails-static-website' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Maximize build space | |
| uses: easimon/maximize-build-space@c28619d8999a147d5e09c1199f84ff6af6ad5794 | |
| with: | |
| root-reserve-mb: 3072 # Leave ~3 GB on root FS (default) | |
| swap-size-mb: 2048 # Allocate 2 GB swap (default: 4 GB; reduce if not needed) | |
| remove-dotnet: 'true' # Remove .NET SDK (~3-4 GB savings) | |
| remove-android: 'true' # Remove Android tools (~2 GB savings) | |
| remove-haskell: 'true' # Remove Haskell (~1 GB savings) | |
| remove-codeql: 'true' # Remove CodeQL (~500 MB savings) | |
| remove-docker-images: 'false' # Prune Docker if used (~1-2 GB savings) | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: liberica | |
| java-version: '11' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
| - name: Publish Main Site | |
| run: ./publish.sh | |
| env: | |
| GITHUB_SLUG: apache/grails-website | |
| GH_TOKEN: ${{ secrets.GRAILS_GHTOKEN }} | |
| GH_BRANCH: asf-site-production | |
| GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | |
| GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | |
| GRADLE_TASK: build | |
| GRAILS_WS_URL: https://grails.apache.org | |
| - name: Publish Guides Site | |
| run: ./publish.sh | |
| env: | |
| GITHUB_SLUG: grails-guides/grails-guides-template | |
| GH_BRANCH: gh-pages | |
| GH_TOKEN: ${{ secrets.APACHE_GRAILS_BUILD_GH_TOKEN }} | |
| GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | |
| GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | |
| GRADLE_TASK: buildGuide |