Skip to content

Commit

Permalink
fix(docs): Downgrade docusaurus to v 3.6 (#11386)
Browse files Browse the repository at this point in the history
builds with 3.7 are failing, typesense wants at least v3.6, so updating
to that
  • Loading branch information
critesjosh authored Jan 21, 2025
1 parent 71d8ede commit 1e5d225
Show file tree
Hide file tree
Showing 4 changed files with 663 additions and 1,705 deletions.
35 changes: 24 additions & 11 deletions docs/deploy_preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,43 @@ set -eu
PR_NUMBER=$1
AZTEC_BOT_COMMENTER_GITHUB_TOKEN="$2"

if [ -n "$PR_NUMBER" ] ; then
if [ -n "$PR_NUMBER" ]; then
API_URL="https://api.github.com/repos/AztecProtocol/aztec-packages/pulls/${PR_NUMBER}/files"

echo "API URL: $API_URL"

DOCS_CHANGED=$(curl -L \
-H "Authorization: Bearer $AZTEC_BOT_COMMENTER_GITHUB_TOKEN" \
"${API_URL}" | \
"${API_URL}" |
jq '[.[] | select(.filename | startswith("docs/"))] | length > 0')

echo "Docs changed: $DOCS_CHANGED"

if [ "$DOCS_CHANGED" = "false" ]; then
echo "No docs changed, not deploying"
exit 0
fi
fi

# Regular deploy if the argument is not "master" and docs changed
DEPLOY_OUTPUT=$(yarn netlify deploy --site aztec-docs-dev)
# Deploy and capture exit code and output
if ! DEPLOY_OUTPUT=$(yarn netlify deploy --dir $(pwd) --site aztec-docs-dev 2>&1); then
echo "Netlify deploy failed with error:"
echo "$DEPLOY_OUTPUT"
exit 1
fi

# Extract and validate preview URL
DOCS_PREVIEW_URL=$(echo "$DEPLOY_OUTPUT" | grep -E "https://.*aztec-docs-dev.netlify.app" | awk '{print $4}')
echo "Unique deploy URL: $DOCS_PREVIEW_URL"
if [ -z "$DOCS_PREVIEW_URL" ]; then
echo "Failed to extract preview URL from Netlify output"
exit 1
fi
echo "Unique deploy URL: ${DOCS_PREVIEW_URL}"

cd ../yarn-project/scripts
if [ -n "$PR_NUMBER" ] ; then
AZTEC_BOT_COMMENTER_GITHUB_TOKEN=$AZTEC_BOT_COMMENTER_GITHUB_TOKEN PR_NUMBER=$PR_NUMBER DOCS_PREVIEW_URL=$DOCS_PREVIEW_URL yarn docs-preview-comment
if [ -n "$PR_NUMBER" ]; then
AZTEC_BOT_COMMENTER_GITHUB_TOKEN="$AZTEC_BOT_COMMENTER_GITHUB_TOKEN" \
PR_NUMBER="$PR_NUMBER" \
DOCS_PREVIEW_URL="$DOCS_PREVIEW_URL" \
yarn docs-preview-comment
fi
2 changes: 1 addition & 1 deletion docs/deploy_prod.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -eu

yarn netlify deploy --site aztec-docs-dev --prod
yarn netlify deploy --dir $(pwd) --site aztec-docs-dev --prod
14 changes: 7 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"@babel/runtime": "^7.26.0",
"@chevrotain/regexp-to-ast": "^11.0.3",
"@cookbookdev/docsbot": "^4.21.12",
"@docusaurus/core": "3.7.0",
"@docusaurus/plugin-content-docs": "3.7.0",
"@docusaurus/plugin-ideal-image": "3.7.0",
"@docusaurus/preset-classic": "3.7.0",
"@docusaurus/theme-mermaid": "3.7.0",
"@docusaurus/core": "3.6.0",
"@docusaurus/plugin-content-docs": "3.6.0",
"@docusaurus/plugin-ideal-image": "3.6.0",
"@docusaurus/preset-classic": "3.6.0",
"@docusaurus/theme-mermaid": "3.6.0",
"@mdx-js/react": "^3.0.1",
"@slorber/react-ideal-image": "^0.0.12",
"axios": "^1.4.0",
Expand All @@ -44,8 +44,8 @@
"vscode-languageserver-types": "^3.17.5"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.7.0",
"@docusaurus/types": "3.7.0",
"@docusaurus/module-type-aliases": "3.6.0",
"@docusaurus/types": "3.6.0",
"@tsconfig/docusaurus": "^1.0.5",
"@types/prop-types": "^15",
"concurrently": "^8.0.1",
Expand Down
Loading

0 comments on commit 1e5d225

Please sign in to comment.