Skip to content

Commit d076fc9

Browse files
authored
fix: docs build cleanup
ucp.dev site building cleanup: - Stop setting latest alias in build_local.sh script, as it was updating latest alias to draft - Add a symlink for /specifications/ to /latest/specifications/ - Update pages build for main to delete old files, and preserve version dirs
1 parent 35a40eb commit d076fc9

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ jobs:
144144
cp -r site/* .
145145
rm -rf site
146146
147+
# Add redirects for all specification files
148+
ln -s latest/specification specification
149+
147150
# Commit and push
148151
git add .
149152
git commit -m "Deploy root site from main" --allow-empty

.linkignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# Ignore ucp.dev dummy links
2-
https://ucp\.dev/specification/reference\?v=2026-01-11
2+
https://ucp\.dev/specification/reference\?v=2026-01-11
3+
4+
# Ignore latest specification links because the target version folder is not pulled down during --main-only checks
5+
/latest/specification/.*
6+
latest/specification/.*

scripts/build_local.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,6 @@ export DOCS_MODE=spec
112112
export UCP_BUILD_VERSION="draft"
113113
mike deploy draft
114114

115-
LATEST_VERSION=$(echo "$RELEASE_BRANCHES" | sed 's/release\///' | sort -r | head -n 1)
116-
117-
if [ -n "$LATEST_VERSION" ]; then
118-
echo "Aliasing 'latest' to $LATEST_VERSION"
119-
mike alias "$LATEST_VERSION" latest --update-aliases
120-
else
121-
echo "No release found, aliasing latest to draft"
122-
mike alias draft latest --update-aliases
123-
fi
124-
125115
echo ">>> Building Root Site"
126116
# Build root site FIRST so we establish the base (index.html, etc.)
127117
# Run in sub-shell or unset variable to be safe, though later steps don't use it

0 commit comments

Comments
 (0)