Commit 058f230
Fix Docusaurus versioning error in publish_website workflow (#3221)
Summary:
Pull Request resolved: #3221
Fix website deployment workflow issues
## Issue 1: Docusaurus version deletion not matching 'v' prefixed directories
### Problem
The 'Delete existing similar versions from Docusaurus' step fails to find and delete existing versions when the release workflow is re-run. This causes the subsequent 'Create new docusaurus version' step to fail with:
```
Error: [docs]: this version already exists! Use a version tag that does not already exist.
```
### Root Cause
When Docusaurus creates a version with `yarn docusaurus docs:version v0.17.2`, it creates directories/files with the 'v' prefix:
- `versioned_docs/version-v0.17.2/`
- `versioned_sidebars/version-v0.17.2-sidebars.json`
But the delete step was stripping the 'v' prefix before searching, so the glob `version-0.17.*` never matched `version-v0.17.2/`.
### Solution
Search for both patterns (with and without 'v' prefix).
---
## Issue 2: Node.js heap out of memory during Docusaurus build
### Problem
The `docusaurus build` command fails with:
```
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
```
### Root Cause
The build consumes ~4GB memory which exceeds Node.js default heap limit.
### Solution
Set `NODE_OPTIONS="--max-old-space-size=8192"` before running `yarn build` in `scripts/build_docs.sh` to increase the heap limit to 8GB.
Reviewed By: saitcakmak
Differential Revision: D95305476
fbshipit-source-id: 454d6a5ce69cdbef457c8b42d2798519abfbd6861 parent ee72a65 commit 058f230
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
72 | | - | |
| 71 | + | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
79 | | - | |
| 78 | + | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
0 commit comments