Skip to content

Commit f6499b9

Browse files
authored
ci: add swap memory to prevent OOM in docs archive build (#189)
1 parent 41abe3b commit f6499b9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/docs-archive-deploy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131

3232
- name: Allocate Swap Space
3333
run: |
34+
sudo swapoff -a || true
35+
sudo rm -f /swapfile
36+
3437
sudo fallocate -l 10G /swapfile || sudo dd if=/dev/zero of=/swapfile bs=1M count=10240
3538
sudo chmod 600 /swapfile
3639
sudo mkswap /swapfile
@@ -41,8 +44,8 @@ jobs:
4144
- name: Build Docusaurus site
4245
working-directory: docs-archive
4346
run: |
44-
NODE_OPTIONS="--max-old-space-size=10240" \
45-
DOCUSAURUS_SSR_CONCURRENCY=1 \
47+
export NODE_OPTIONS="--max-old-space-size=10240"
48+
export DOCUSAURUS_SSR_CONCURRENCY=1
4649
npm run build
4750
4851
- name: Deploy to Vercel (prebuilt)

0 commit comments

Comments
 (0)