Fix migration step: source nvm before running node on EC2
Some checks failed
Deploy / deploy-frontend (push) Successful in 2m5s
Deploy / tag-deploy (push) Has been skipped
Deploy / detect (push) Successful in 5s
Deploy / deploy-api (push) Failing after 22s

SSM runs with minimal PATH that doesn't include nvm-managed node.
Source nvm.sh before executing migrate.js.
This commit is contained in:
DaX
2026-03-05 01:43:41 +01:00
parent 291997caa5
commit f929c384c1

View File

@@ -160,7 +160,7 @@ jobs:
"rm -rf repo.tar.gz filamenteka",
"echo Migration files:",
"ls -la /home/ubuntu/filamenteka-api/database/migrations/",
"cd /home/ubuntu/filamenteka-api && node api/migrate.js"
"export NVM_DIR=/home/ubuntu/.nvm && . $NVM_DIR/nvm.sh && cd /home/ubuntu/filamenteka-api && node api/migrate.js"
]' \
--output json \
--query "Command.CommandId" --output text)