Skip to content

Commit

Permalink
Merge pull request #187 from r0qs/broken-link-checker
Browse files Browse the repository at this point in the history
Add broken link checker
  • Loading branch information
significance authored Jun 9, 2021
2 parents af05be4 + d7c02ba commit 74d9812
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-node@v1
with:
node-version: '12'

- name: Build
run: |
npm install
npm run build
- name: Check broken links
run: set -o pipefail; npm run linkchecker 2>/dev/null | grep "Getting links from\|BROKEN"
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
"name": "bee-docs",
"version": "0.0.0",
"private": true,
"config": {
"linkchecker": "blc -ro --filter-level 0 --exclude swarm.ethereum.org --exclude gateway.ethswarm.org --exclude discord.gg --exclude etherscan.io --exclude awesome.re --exclude swarm.eth --exclude localhost:1633 --exclude localhost:9090 --exclude localhost:1635 --exclude 192.168.0.1 --exclude 127.0.0.1"
},
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"serve": "docusaurus serve"
"serve": "docusaurus serve",
"linkchecker": "start-server-and-test serve :3000 linkchecker:local",
"linkchecker:local": "$npm_package_config_linkchecker http://localhost:3000/docs",
"linkchecker:prod": "$npm_package_config_linkchecker https://docs.ethswarm.org/docs/"
},
"dependencies": {
"@docusaurus/core": "^2.0.0-alpha.71",
Expand All @@ -35,5 +41,9 @@
"engines": {
"node": ">=14.0.0",
"npm": ">=6.0.0"
},
"devDependencies": {
"broken-link-checker": "^0.7.8",
"start-server-and-test": "^1.12.3"
}
}

0 comments on commit 74d9812

Please sign in to comment.