Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): Downgrade docusaurus to v 3.6 #11386

Merged
merged 8 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 7 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: 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 /usr/src/docs --site aztec-docs-dev 2>&1); then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ludamad specifying --dir fixed it

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 /usr/src/docs --site aztec-docs-dev --prod
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ludamad should we specify dir here as well?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should instead be --dir $(pwd) IMO, this is too hard-coded

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
Loading