Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@ on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read

# Deploys run one at a time and are never canceled. Pull requests only build,
# so each gets its own group, where a new push cancels the previous build.
concurrency:
group: deploy
cancel-in-progress: false
group: ${{ github.event_name == 'pull_request' && format('build-{0}', github.event.pull_request.number) || 'deploy' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Check out repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup Node.js
Expand All @@ -30,11 +34,13 @@ jobs:
- name: Build with Suri
run: npm run build
- name: Upload GitHub Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v5
with:
path: build/
include-hidden-files: true
deploy:
if: github.event_name != 'pull_request'
needs: build
permissions:
pages: write
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Suri, including additional deployment options.
### Auto-Deploy

Any commits to the `main` branch of your new repository will trigger a new build
and deploy. You can change this by editing
and deploy. Pull requests are built without deploying, so a mistake in
`links.json` is caught before it's merged. You can change this by editing
[`.github/workflows/deploy.yml`](.github/workflows/deploy.yml), which is the
GitHub Actions workflow for building the site and deploying to GitHub Pages.

Expand Down
Loading