Skip to content

add error check on Test-Deploy pipeline #460

add error check on Test-Deploy pipeline

add error check on Test-Deploy pipeline #460

Workflow file for this run

name: Test Deploy (on PR)
on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
permissions:
id-token: write
contents: read
jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: website/package-lock.json
- name: Build website
working-directory: website
run: |
npm ci
npm run build
- name: Check for crash/error message
working-directory: website
run: |
if grep -Rq "This page crashed|error" . ; then
echo "Error: Found 'the page is crashed' message in site output."
exit 1