Skip to content

docs: update readme #587

docs: update readme

docs: update readme #587

Workflow file for this run

name: links when pr
on:
pull_request:
branches: [ main ]
paths:
- '**.md'
- '.lycheeignore'
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# replace site base url to build MkDocs in local
- name: Replace Base URL
run: |
sed -i 's|https://docs.devstream.io|http://localhost|g' mkdocs.yml
# disable "edit this page" link
# see https://github.com/devstream-io/devstream/issues/1386 for more details
- name: Disable Edit This Page
run: |
# edit_uri: edit/main/docs -> edit_uri: ""
sed -i 's|edit_uri: edit/main/docs|edit_uri: ""|g' mkdocs.yml
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install MkDocs and dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build MkDocs
run: mkdocs build
- name: Link Checker
uses: lycheeverse/[email protected]
with:
fail: true
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
# -E, --exclude-all-private Exclude all private IPs from checking.
# -i, --insecure Proceed for server connections considered insecure (invalid TLS)
# -n, --no-progress Do not show progress bar.
# -t, --timeout <timeout> Website timeout in seconds from connect to response finished [default:20]
# --max-concurrency <max-concurrency> Maximum number of concurrent network requests [default: 128]
# -a --accept <accept> Comma-separated list of accepted status codes for valid links
# ./site the MkDocs site directory to check
# ./*.md all markdown files in the root directory
args: -E -i -n -t 45 --max-concurrency 64 -a 429,401 -- 'site' '*.md'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}