set up github pages to move from netlify #6
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: PR Build Check & Preview | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, closed] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: pr-preview-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-preview: | |
| if: github.event.action != 'closed' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: make check | |
| # continue-on-error because fork PRs don't have write access to push | |
| # the preview to gh-pages. The build check above still validates the PR. | |
| - uses: rossjrw/pr-preview-action@v1 | |
| continue-on-error: true | |
| with: | |
| source-dir: _build/html | |
| cleanup: | |
| if: github.event.action == 'closed' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: rossjrw/pr-preview-action@v1 |