Skip to content

Commit

Permalink
github: Add checker for docs links
Browse files Browse the repository at this point in the history
Signed-off-by: René Dudfield <renedudfield@microsoft.com>
  • Loading branch information
illume committed Mar 21, 2024
1 parent 90e731c commit 63e9e05
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/check-docs-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

# Test docs/ links are valid.
#
# htmltest https://github.com/wjdp/htmltest-action/
# hugo https://github.com/peaceiris/actions-hugo
# upload test results https://github.com/actions/upload-artifact

name: check-doc-links

on: pull_request
jobs:
htmltest:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: recursive # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Set up Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.117.0'
extended: true

- name: Build Hugo
run: hugo -s docs -d $GITHUB_WORKSPACE/dist

- name: Run htmltest
uses: wjdp/htmltest-action@master
with:
path: dist

- uses: actions/upload-artifact@v4
with:
name: htmltest-output
path: dist

0 comments on commit 63e9e05

Please sign in to comment.