docs: add governance policy plane tutorial + reference #175
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 website | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| # Rebuild when atmosphere core changes (triggered from main repo) | |
| repository_dispatch: | |
| types: [rebuild-site] | |
| # Nightly rebuild to pick up Javadoc changes from core repo | |
| schedule: | |
| - cron: '0 6 * * *' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # ── Marketing site (Astro) ── | |
| - uses: withastro/action@v3 | |
| with: | |
| path: ./website | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # withastro/action uploads to the default pages artifact. | |
| # Download it, merge in docs + javadoc, then re-upload. | |
| - name: Download Astro artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: github-pages | |
| path: _site_archive | |
| - name: Extract Astro build | |
| run: | | |
| mkdir -p _merged | |
| tar -xf _site_archive/artifact.tar -C _merged | |
| # ── Starlight docs ── | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Build Starlight docs | |
| working-directory: docs | |
| run: npm ci && npm run build | |
| - name: Merge docs into site | |
| run: cp -r docs/dist _merged/docs | |
| # ── Javadoc (from main atmosphere repo) ── | |
| - name: Checkout atmosphere core | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Atmosphere/atmosphere | |
| ref: main | |
| path: _atmosphere | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Extract project version | |
| id: version | |
| working-directory: _atmosphere | |
| run: | | |
| VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout) | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Compile sources | |
| working-directory: _atmosphere | |
| run: ./mvnw compile -pl modules/cpr -Pfastinstall -q | |
| - name: Generate Javadoc | |
| working-directory: _atmosphere | |
| run: | | |
| DEPS_CP=$(./mvnw dependency:build-classpath -pl modules/cpr -Dmdep.outputFile=/dev/stdout -q) | |
| javadoc -d ../target/apidocs \ | |
| -sourcepath modules/cpr/src/main/java \ | |
| -classpath "$DEPS_CP" \ | |
| -subpackages org.atmosphere \ | |
| -source 21 \ | |
| -Xdoclint:none \ | |
| -quiet \ | |
| -encoding UTF-8 \ | |
| -windowtitle "Atmosphere ${{ steps.version.outputs.version }} API" \ | |
| -doctitle "Atmosphere Framework ${{ steps.version.outputs.version }} API" \ | |
| -header "Atmosphere ${{ steps.version.outputs.version }}" \ | |
| -bottom "Copyright © 2008-2026 Async-IO.org. All rights reserved." \ | |
| -link "https://docs.oracle.com/en/java/javase/21/docs/api/" \ | |
| -link "https://jakarta.ee/specifications/platform/9/apidocs/" | |
| - name: Merge Javadoc into site | |
| run: cp -r target/apidocs _merged/apidocs | |
| # ── Upload merged artifact ── | |
| - name: Delete Astro-only artifact | |
| uses: geekyeggo/delete-artifact@v5 | |
| with: | |
| name: github-pages | |
| - name: Upload merged Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _merged | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |