Skip to content

Commit cae329c

Browse files
committed
fix: Allow to add link pointing to a specific version of the doc
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent 7ae75b7 commit cae329c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/sphinxbuild.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ jobs:
5858
# - mailto: links: These are not valid URLs and will always fail
5959
# - 404.html: This is not necessary
6060
# - latest/stable/xx links from the version selector
61+
# - links to a specific numbered version (e.g. docs.nextcloud.com/server/34/...): this
62+
# job only ever builds and stages the branch under test (e.g. "latest" for master), so
63+
# any other version's folder under stage/ doesn't exist here and can never be verified
64+
# locally. Content referencing an older/newer release intentionally links to a pinned
65+
# version and is checked against the live site instead, not this offline build.
6166
- name: Check for broken links with lychee
6267
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
6368
with:
@@ -71,7 +76,8 @@ jobs:
7176
--remap "https://docs.nextcloud.com/server/ file://$(pwd)/stage/"
7277
--exclude 'go\.php' --exclude 'mailto:' --exclude-path '.*/404\.html' --exclude-path '.*/_static/.*'
7378
--exclude "/user_manual/" --include "/user_manual/en/"
74-
--exclude '^file://.*/stage/(latest|stable|[0-9]+)/(developer_manual|admin_manual|user_manual)/?$'
79+
--exclude '^file://.*/stage/(latest|stable)/(developer_manual|admin_manual|user_manual)/?$'
80+
--exclude '^file://.*/stage/[0-9]+/'
7581
'stage/${{ needs.build.outputs.branch_name }}/user_manual/en/**/*.html'
7682
'stage/${{ needs.build.outputs.branch_name }}/admin_manual/**/*.html'
7783
'stage/${{ needs.build.outputs.branch_name }}/developer_manual/**/*.html'

0 commit comments

Comments
 (0)