Skip to content

[Snyk] Upgrade @types/react from 18.0.27 to 18.3.3 #4

[Snyk] Upgrade @types/react from 18.0.27 to 18.3.3

[Snyk] Upgrade @types/react from 18.0.27 to 18.3.3 #4

Workflow file for this run

name: Check for internal broken links
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- .github/workflows/broken_links.yml
- "website/**"
types:
- opened
- synchronize
- reopened
jobs:
check-broken-links:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
# By default actions/checkout puts us in detached HEAD state. We need to checkout the branch so git log works
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
# This matches the default on Vercel
fetch-depth: 10
- name: Should run broken links check
if: github.event_name == 'pull_request'
id: broken-links
working-directory: website
run: |
if ! scripts/diff.sh ; then
echo "check=true" >> $GITHUB_OUTPUT
else
echo "check=false" >> $GITHUB_OUTPUT
fi
- name: Setup node
if: steps.broken-links.outputs.check != 'false'
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Waiting for Vercel Preview
if: github.event_name == 'pull_request' && steps.broken-links.outputs.check != 'false'
uses: patrickedqvist/wait-for-vercel-preview@9b632b282700b82f968b711bc381426eed365714
id: preview-deployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 1200
check_interval: 10
environment: 'Preview'
allow_inactive: true
- name: Set Vercel URL output
if: steps.broken-links.outputs.check != 'false'
id: vercel
run: |
DEPLOY_URL=${{ steps.preview-deployment.outputs.url }}
echo "url=${DEPLOY_URL:-"https://docs.cloudquery.io"}" >> $GITHUB_OUTPUT
- name: Check for broken links
if: steps.broken-links.outputs.check != 'false'
# We need to exclude some hosts that protect against bots
run: |
set -o pipefail
npx broken-link-checker --requests 100 --host-requests 10 -f -r -v -o --filter-level 3 \
--exclude-external \
--exclude "${{ steps.vercel.outputs.url }}/logo" \
--exclude "${{ steps.vercel.outputs.url }}/docs/plugins/sources/*/tables" \
--exclude "${{ steps.vercel.outputs.url }}/integrations/*" \
--exclude "${{ steps.vercel.outputs.url }}/buy/*" \
--exclude "${{ steps.vercel.outputs.url }}/contact" \
--exclude "${{ steps.vercel.outputs.url }}/contact-policies" \
--exclude "${{ steps.vercel.outputs.url }}/register_for_cloud" \
--exclude "${{ steps.vercel.outputs.url }}/apply_for_job" \
--exclude "${{ steps.vercel.outputs.url }}/careers" \
--exclude "${{ steps.vercel.outputs.url }}/blog" \
--exclude "${{ steps.vercel.outputs.url }}/blog/*" \
--exclude "${{ steps.vercel.outputs.url }}/integrations" \
--exclude "${{ steps.vercel.outputs.url }}/integrations/*" \
--exclude "${{ steps.vercel.outputs.url }}/terms" \
--exclude "${{ steps.vercel.outputs.url }}/privacy" \
--exclude cloudquery.io/discord \
--exclude cloudquery.io/buy \
--exclude localhost \
${{ steps.vercel.outputs.url }}/docs \
| grep -v '───OK───' | grep -v '──SKIP──' | grep -v '0 broken'