Publish to GitHub Pages #872
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 to GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'docs/release/2[0-9]+.[0-9]+' | |
| pull_request: | |
| schedule: | |
| - cron: '0 2 * * *' # run at 2 AM UTC | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '16' | |
| - name: Install Antora dependencies | |
| run: npm ci | |
| - name: Generate Site | |
| run: npx antora --stacktrace antora-playbook.yml | |
| - name: Publish to GitHub Pages | |
| if: github.event_name != 'pull_request' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: build/site | |