Skip to content

Commit c427314

Browse files
committed
workflow: move link check to CI
1 parent b4770d0 commit c427314

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
- attach_workspace:
4848
at: ~/
4949
- run: yarn lint
50+
- run: yarn check-links
5051
- run: yarn test -p cli-service-global,eslint,pwa,babel,babel-preset-app
5152

5253
group-4:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"docs:build": "vuepress build docs"
1919
},
2020
"gitHooks": {
21-
"pre-commit": "lint-staged && yarn run check-links",
21+
"pre-commit": "lint-staged",
2222
"commit-msg": "node scripts/verifyCommitMsg.js"
2323
},
2424
"jest": {

scripts/checkLinks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async function checkLink (file, link, n) {
1515
if (result.statusCode !== 200) {
1616
throw new Error('error')
1717
} else {
18-
// console.log('[OK]', link, result.statusCode)
18+
console.log('[OK]', link, result.statusCode)
1919
}
2020
} catch (e) {
2121
console.warn('[!!]', link, `${file}:${parseInt(n) + 1}`)

0 commit comments

Comments
 (0)