Run the remote deploy step in a login shell
This commit is contained in:
parent
7f0d823d6c
commit
5c455bfd50
1 changed files with 3 additions and 2 deletions
5
justfile
5
justfile
|
|
@ -20,12 +20,13 @@ deploy target: build
|
|||
rsync -av --delete --progress build/ {{target}}:~/squalk/
|
||||
@just purge-web-cache
|
||||
|
||||
# Ships the Node build plus its runtime deps and env, then restarts the unit
|
||||
# Ships the Node build plus its runtime deps and env, then restarts the unit.
|
||||
# The remote step runs in a login shell so the user's PATH (npm, nvm…) applies.
|
||||
deploy-ssr target: build-ssr
|
||||
rsync -av --delete --progress --exclude node_modules build/ {{target}}:~/squalk/build/
|
||||
rsync -av package.json package-lock.json {{target}}:~/squalk/
|
||||
rsync -av .env.production {{target}}:~/squalk/.env
|
||||
ssh {{target}} 'cd ~/squalk && npm ci --omit=dev && sudo systemctl restart squalk'
|
||||
ssh {{target}} '$SHELL -l -c "cd ~/squalk && npm ci --omit=dev && sudo systemctl restart squalk"'
|
||||
@just purge-web-cache
|
||||
|
||||
purge-web-cache:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue