fix(ci): use explicit NVM_DIR to load nvm in non-interactive shell

Gitea Actions runs steps in a non-interactive shell that does not
source .bashrc. Use the explicit NVM_DIR path to load nvm.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-27 13:03:13 +03:00
parent 7f9e857695
commit 3603c31e21

View File

@@ -20,7 +20,8 @@ jobs:
- name: Set up Node.js - name: Set up Node.js
run: | run: |
source ~/.nvm/nvm.sh export NVM_DIR="${HOME}/.nvm"
[ -s "${NVM_DIR}/nvm.sh" ] && . "${NVM_DIR}/nvm.sh"
nvm install --lts nvm install --lts
echo "$(dirname "$(nvm which current)")" >> "$GITHUB_PATH" echo "$(dirname "$(nvm which current)")" >> "$GITHUB_PATH"