Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Validate Jekyll built ./_site
- This is using GitLab with Runner support and https://github.com/gjtorikian/html-proofer
- First, install the gem:
- ```gem install html-proofer```
- or system wide:
- ```sudo gem install html-proofer```
- Then edit your `.gitlab-ci.yml`:
- ```
- job1:
- script: "jekyll doctor; jekyll build; htmlproofer ./_site --allow-hash-href --check-html --empty-alt-ignore --only-4xx"
- ```
- And run the runner. If errors are found, even from the HTML validator, build will be marked as failed. Otherwise as passed.
- Example:
- gitlab-ci-multi-runner 1.2.0 (3a4fcd4)
- Using Shell executor...
- Running on [censored]...
- Fetching changes...
- Removing .sass-cache/
- Removing _site/
- HEAD is now at a384198 Update 2015-01-17-phpmyadmin-PMA-vuln.markdown
- From https://[censored]/wirehack7/capsop.com
- a384198..b3f5e75 master -> origin/master
- Checking out b3f5e753 as master...
- $ jekyll doctor; jekyll build; htmlproofer ./_site --allow-hash-href --check-html --empty-alt-ignore --only-4xx
- Configuration file: /home/gitlab-runner/builds/cc9cc216/0/wirehack7/capsop.com/_config.yml
- Your test results are in. Everything looks fine.
- Configuration file: /home/gitlab-runner/builds/cc9cc216/0/wirehack7/capsop.com/_config.yml
- Source: /home/gitlab-runner/builds/cc9cc216/0/wirehack7/capsop.com
- Destination: /home/gitlab-runner/builds/cc9cc216/0/wirehack7/capsop.com/_site
- Incremental build: disabled. Enable with --incremental
- Generating...
- done in 0.514 seconds.
- Auto-regeneration: disabled. Use --watch to enable.
- Running ["ImageCheck", "HtmlCheck", "LinkCheck", "ScriptCheck"] on ["./_site"] on *.html...
- Checking 132 external links...
- Ran on 19 files!
- HTML-Proofer finished successfully.
- Build succeeded
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement