Share Aliki class navigation across generated pages #875
Workflow file for this run
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: Build PR Preview | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, edited] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build Preview | |
| # Base retargets need a preview, but title and body edits do not change the site. | |
| if: >- | |
| github.repository == 'ruby/rdoc' && | |
| (github.event.action != 'edited' || github.event.changes.base) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| # A skipped edit must not cancel an active build for the same PR. | |
| concurrency: | |
| group: pr-preview-build-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| steps: | |
| # This job executes untrusted pull request code. It must not receive secrets | |
| # or a token with write access. | |
| - name: Checkout PR code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| persist-credentials: false | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0 | |
| with: | |
| ruby-version: '3.4' | |
| bundler-cache: true | |
| - name: Build site | |
| run: bundle exec rake rdoc | |
| - name: Upload preview site | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: pr-preview-site | |
| path: _site/ | |
| if-no-files-found: error | |
| retention-days: 1 |