Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions .github/workflows/check-removed-urls.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Check for removed URLs

on:
workflow_call:
pull_request:
branches: [main]

Expand All @@ -24,33 +25,33 @@ jobs:
repository: ${{ github.event.pull_request.base.repo.full_name }}
fetch-depth: 0
path: base
- name: Checkout sphinx-stack
uses: actions/checkout@v5
with:
repository: canonical/sphinx-stack
path: sphinx-stack
- uses: actions/setup-python@v6
- name: Build docs
run: |
for dir in compare base; do
pushd ${dir}/docs
make install
. .sphinx/venv/bin/activate
make html
popd
done
- name: Generate current URLs list
run: |
for dir in compare base; do
pushd ${dir}/docs
find ./_build/ -name '*.html' \
| sed 's|/_build||;s|/index.html$|/|;s|.html$||' \
| sort > urls.txt
popd
build_dir="${dir}/docs/_build"
urls_file="${dir}/docs/urls.txt"

if [ ! -d "${build_dir}" ]; then
echo "Expected docs build directory not found: ${build_dir}"
exit 1
fi

find "${build_dir}" -name '*.html' \
| sed "s|^${build_dir}||;s|^/html||;s|/index.html$|/|;s|.html$||" \
| sort > "${urls_file}"
done
- name: Compare URLs
run: |
BASE_URLS_PATH="base/docs/urls.txt"
COMPARE_URLS_PATH="compare/docs/urls.txt"
removed=$(comm -23 ${BASE_URLS_PATH} ${COMPARE_URLS_PATH} )
if [ -n "$removed" ]; then
echo "The following URLs were removed:"
echo "$removed"
echo "Please ensure removed pages are redirected"
exit 1
fi
run: python3 sphinx-stack/docs/_dev/check_removed_urls.py
4 changes: 4 additions & 0 deletions .github/workflows/cla-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
pull_request:
branches: [main]

permissions:
contents: read
pull-requests: read

jobs:
cla-check:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/markdown-style-checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Markdown style checks

on:
workflow_call:
push:
branches:
- main
Expand All @@ -14,7 +15,7 @@ on:

jobs:
markdown-lint:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
Expand Down
Loading