Use lychee to check links

pull/21/head
earnest ma 1 year ago
parent ac5b95b09e
commit 687c1eb609
Signed by: earnest ma
GPG Key ID: A343F43342EB6E2A

@ -7,6 +7,10 @@ pipeline:
secrets: [ ssh_key ]
commands:
- apk add --no-cache git hugo make openssh-client rsync
# lychee hasn't been packaged for Alpine Linux
- apk add --no-cache curl
- curl -LO https://github.com/lycheeverse/lychee/releases/download/v0.9.0/lychee-v0.9.0-x86_64-unknown-linux-musl.tar.gz
- tar -xzf lychee-v0.9.0-x86_64-unknown-linux-musl.tar.gz -C /usr/bin
- mkdir -p ~/.ssh && echo "StrictHostKeyChecking=no" >> ~/.ssh/config
- eval "$(ssh-agent -s)"
- echo "$SSH_KEY" | ssh-add -
@ -21,6 +25,10 @@ pipeline:
secrets: [ ssh_key ]
commands:
- apk add --no-cache git hugo make openssh-client rsync
# lychee hasn't been packaged for Alpine Linux
- apk add --no-cache curl
- curl -LO https://github.com/lycheeverse/lychee/releases/download/v0.9.0/lychee-v0.9.0-x86_64-unknown-linux-musl.tar.gz
- tar -xzf lychee-v0.9.0-x86_64-unknown-linux-musl.tar.gz -C /usr/bin
- mkdir -p ~/.ssh && echo "StrictHostKeyChecking=no" >> ~/.ssh/config
- eval "$(ssh-agent -s)"
- echo "$SSH_KEY" | ssh-add -

@ -25,13 +25,20 @@ serve:
.PHONY: build
build: hugo
.PHONY: check-links
check-links: hugo
lychee content/
.PHONY: test
test: check-links
.PHONY: deploy-main
deploy-main: build
deploy-main: build test
rsync $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST)/ -ravz --delete
.PHONY: deploy-staging
deploy-staging: DOMAIN = staging.earnestma.com
deploy-staging: build
deploy-staging: build test
rsync $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST)/ -ravz --delete
.PHONY: all

@ -0,0 +1,8 @@
exclude = [
"^gemini://.*",
"example",
"localhost"
]
exclude_all_private = false
exclude_mail = true
Loading…
Cancel
Save