Skip to content

changed to mkdocs and use readthedoc theme #1666

changed to mkdocs and use readthedoc theme

changed to mkdocs and use readthedoc theme #1666

Workflow file for this run

name: Check broken links
on:
schedule:
- cron: '0 8 * * *'
# Triggers the workflow on push or pull request events
push:
branches: [ main ]
paths:
- '**.md'
pull_request:
paths:
- '**.md'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
LinkChecker:
name: Link Checker
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
actions: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Lychee Broken Link Checker
uses: lycheeverse/lychee-action@v1.9.3
with:
# Check all markdown files in repo
args: --base ./docs -vvv --no-progress --max-redirects 30 --accept 200,429 './docs/**/*.md'
fail: true
# To avoid automated spam, try to find an existing open issue before opening a new one
# Source: https://github.com/cilium/tetragon/pull/805
- name: Search for existing issue number
id: search-issue
if: always()
run: |
encoded_issue_name=$(echo "$ISSUE_NAME" | sed 's/ /%20/g')
response=$(curl -s -X GET "https://api.github.com/search/issues?q=$encoded_issue_name+repo:sandboxie-plus/sandboxie-docs+state:open+label:automated-report&type=Issues")
issue_number=$(echo "$response" | jq -r '.items[0].number // empty')
echo "issue_number=$issue_number" >> $GITHUB_OUTPUT
- name: Create issue from file
if: always() && env.lychee_exit_code != 0
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
issue-number: ${{ steps.search-issue.outputs.issue_number }}
labels: automated-report