Skip to content

Add workflow for validating redirects #5

Add workflow for validating redirects

Add workflow for validating redirects #5

name: Validate Redirects
on:
pull_request:
paths:
- 'public/_redirects'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
validate:
name: Validate redirects
runs-on: ubuntu-latest
steps:
- name: ⬇️ Set up code
uses: actions/checkout@v4
with:
show-progress: false
- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- name: 🏗️ Build Site
working-directory: ./
env:
GOOGLE_PRIVATE_KEY: ${{ secrets.SA }}
NETLIFY: 1
run: |
npm install
npm run build
- name: ✔ Validate redirects
working-directory: ./src/scripts
run: |
npm install
node validate-redirects.mjs