File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 - name : Build documentation
3232 run : mkdocs build --strict
3333
34+ - name : Determine base URL
35+ id : base-url
36+ run : |
37+ if [ "${{ github.event_name }}" = "pull_request" ]; then
38+ echo "url=https://ez-systems-developer-documentation--${{ github.event.pull_request.number }}.com.readthedocs.build/en/${{ github.event.pull_request.number }}/" >> "$GITHUB_OUTPUT"
39+ elif [[ "${{ github.ref_name }}" =~ ^[0-9]+\.[0-9]+$ ]]; then
40+ echo "url=https://doc.ibexa.co/en/${{ github.ref_name }}/" >> "$GITHUB_OUTPUT"
41+ else
42+ echo "url=https://doc.ibexa.co/en/latest/" >> "$GITHUB_OUTPUT"
43+ fi
44+
3445 - name : Restore lychee cache
3546 uses : actions/cache@v4
3647 with :
4758 --config lychee.toml
4859 --cache
4960 --cache-exclude-status "500.."
61+ --base-url ${{ steps.base-url.outputs.url }}
5062 site
5163 fail : true
5264 env :
Original file line number Diff line number Diff line change @@ -102,5 +102,6 @@ exclude_all_private = true
102102# Must match the directory passed as input to lychee.
103103root_dir = " site"
104104
105- # Base URL for resolving relative links in HTML files.
106- base_url = " https://doc.ibexa.co/en/latest/"
105+ # base_url is intentionally omitted here — it is passed dynamically via
106+ # --base-url in the GitHub Actions workflow, computed from the branch name
107+ # (e.g. master → /en/latest/, 5.0 → /en/5.0/) or from READTHEDOCS_CANONICAL_URL.
You can’t perform that action at this time.
0 commit comments