Skip to content
Closed
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
31 changes: 30 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches: [main]
paths:
- 'site/**'
- '.github/workflows/pages.yml'
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
Comment on lines +9 to +11
workflow_run:
workflows: ['Release']
types: [completed]
Expand All @@ -13,15 +17,38 @@ on:
permissions:
contents: read
pages: write
pull-requests: read
id-token: write
Comment on lines 17 to 21

concurrency:
group: pages
cancel-in-progress: false

jobs:
changes:
runs-on: ubuntu-latest
name: Site change filter
outputs:
site: ${{ steps.filter.outputs.site || steps.default.outputs.site }}
steps:
- name: Check changed paths
id: filter
if: github.event_name == 'pull_request'
uses: dorny/paths-filter@v3
with:
filters: |
site:
- 'site/**'
- '.github/workflows/pages.yml'

- name: Mark non-PR events for build
id: default
if: github.event_name != 'pull_request'
run: echo "site=true" >> "$GITHUB_OUTPUT"

build:
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
needs: changes
if: needs.changes.outputs.site == 'true' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success')
runs-on: ubuntu-latest
name: Build
steps:
Expand All @@ -42,12 +69,14 @@ jobs:
run: cd site && npm run build

- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v5
with:
path: site/dist

deploy:
needs: build
if: github.event_name != 'pull_request' && needs.build.result == 'success'
runs-on: ubuntu-latest
name: Deploy
environment:
Expand Down
Loading