Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
12 changes: 12 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
set :whenever_path, ->{ release_path }

namespace :deploy do
before :updated, :ensure_node_version do
on roles(:web) do
within release_path do
# Ensure nvm is installed
execute :bash, "-c 'if ! command -v nvm &> /dev/null; then curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash; fi'"

# Load nvm and ensure Node.js version 20.19.1 is installed
execute :bash, "-c 'source ~/.nvm/nvm.sh && nvm install 20.19.1 && nvm use 20.19.1'"
end
end
end

after :updated, :update_config do
on roles(:web), in: :groups, limit: 3, wait: 10 do
within release_path do
Expand Down
Loading