mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 21:35:52 +00:00
add link checking script
This commit is contained in:
parent
f45e495e38
commit
71364e94ea
24
website/scripts/link-check.sh
Executable file
24
website/scripts/link-check.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
# Install netlify-cli
|
||||||
|
sudo npm install netlify-cli -g
|
||||||
|
|
||||||
|
# Deploy site to netlify
|
||||||
|
# Assumes NETLIFY_SITE_ID and NETLIFY_AUTH_TOKEN env variables are set
|
||||||
|
output=$(netlify deploy --dir=./website/build)
|
||||||
|
|
||||||
|
# Grab deploy URL
|
||||||
|
url=$(echo "$output" | grep "Live Draft URL" | sed -E 's/.*(https:\/\/.*$)/\1/')
|
||||||
|
|
||||||
|
# Checks broken links
|
||||||
|
wget \
|
||||||
|
--delete-after \
|
||||||
|
--level inf \
|
||||||
|
--no-verbose \
|
||||||
|
--recursive \
|
||||||
|
--no-directories \
|
||||||
|
--no-host-directories \
|
||||||
|
--page-requisites \
|
||||||
|
--spider \
|
||||||
|
$url
|
Loading…
x
Reference in New Issue
Block a user