feat: MkDocs baseline (experiment) #169
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Checks website for broken links | |
name: Website Links | |
on: | |
pull_request: | |
paths: | |
- docs/** | |
- .github/workflows/test-website-links.yml | |
# Prevent multiple concurrent runs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: docs | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.x' | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
- name: Install dependencies | |
run: | | |
gem install html-proofer | |
- name: Use 'localhost' | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "https://dotnet.stockindicators.dev" | |
replace: "http://127.0.0.1:4000" | |
regex: false | |
include: "docs/**" | |
- name: Build and serve site | |
run: | | |
echo "Nothing to build or serve yet" | |
exit 1 | |
- name: Test for broken URLs | |
run: > | |
htmlproofer _site | |
--no-enforce-https | |
--no-check-external-hash | |
--ignore-status-codes "0,302,403,406,408,429,503,999" | |
--ignore-urls "/fonts.gstatic.com/" | |
- name: Kill site (failsafe) | |
if: always() | |
run: pkill -f docfx |