Skip to content

personalization cleanup - cont. (#3321) #372

personalization cleanup - cont. (#3321)

personalization cleanup - cont. (#3321) #372

Workflow file for this run

name: "Check documentation links"
on:
push:
branches:
- master
- "[0-9]+.[0-9]+"
workflow_dispatch:
inputs:
force_recheck:
description: "Clear lychee cache and recheck all links from scratch"
type: boolean
default: false
devdoc_50_branch:
description: "ibexa/documentation-developer branch for 5.0"
type: string
default: "5.0"
devdoc_46_branch:
description: "ibexa/documentation-developer branch for 4.6"
type: string
default: "4.6"
userdoc_50_branch:
description: "ibexa/documentation-user branch for 5.0"
type: string
default: "5.0"
userdoc_46_branch:
description: "ibexa/documentation-user branch for 4.6"
type: string
default: "4.6"
connect_branch:
description: "ibexa/documentation-connect branch"
type: string
default: "main"
pull_request: ~
schedule:
- cron: "0 6 * * *"
jobs:
link-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.13]
steps:
- uses: actions/checkout@v4
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
private-key: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
owner: ${{ github.repository_owner }}
- name: Configure git credentials for private repositories
run: |
git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/ibexa/documentation-connect".insteadOf \
"https://github.com/ibexa/documentation-connect"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install MkDocs dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build documentation
run: mkdocs build --strict
- name: Clone and build versioned repositories for link remap
run: >-
bash tools/clone-repositories.sh
"${{ inputs.devdoc_50_branch || '5.0' }}"
"${{ inputs.devdoc_46_branch || '4.6' }}"
"${{ inputs.userdoc_50_branch || '5.0' }}"
"${{ inputs.userdoc_46_branch || '4.6' }}"
"${{ inputs.connect_branch || 'main' }}"
- name: Restore lychee cache
if: ${{ !inputs.force_recheck }}
uses: actions/cache@v4
with:
path: .lycheecache
key: lychee-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
lychee-${{ github.ref_name }}-
lychee-
- name: Check links
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
args: >-
--config lychee.toml
--cache
--cache-exclude-status "400.."
site
output: lychee-report.md
jobSummary: true
fail: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment broken links
if: always() && github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
path: lychee-report.md