Deploy Antora Docs #57
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
| # GitHub Actions Workflow: Build and Deploy Antora Documentation | |
| # Automatically builds documentation site from multiple repositories and deploys to GitHub Pages. | |
| name: Build and Deploy Antora Docs | |
| on: | |
| push: | |
| branches: [main] # Auto-deploy on main branch updates | |
| workflow_dispatch: # Manual trigger option | |
| schedule: | |
| - cron: '0 2 * * *' # Run daily at 2 AM UTC | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required to push to the gh-pages branch | |
| steps: | |
| - name: Checkout playbook source | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24.3.0' # Specific version for consistency | |
| - name: Install Antora | |
| run: npm install -g @antora/cli @antora/site-generator @antora/lunr-extension | |
| - name: Generate Site | |
| run: antora antora-playbook.yml # Build site to ./build/site | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: build/site # Deploy generated site content |