-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
- name: Compress build artifacts | ||
run: | | ||
cd frontend | ||
tar -czf nuxt-build.tar.gz .output nuxt.config.ts package.json assets | ||
tar -czf nuxt-build.tar.gz .output nuxt.config.ts package.json assets ecosystem.config.js | ||
- name: List compressed file (for debugging) | ||
run: | | ||
|
@@ -70,7 +70,6 @@ jobs: | |
echo "$SSH_PRIVATE_KEY" > deploy_key | ||
chmod 600 deploy_key | ||
scp -o StrictHostKeyChecking=no -i deploy_key nuxt-build.tar.gz [email protected]:/tmp/nuxt-build.tar.gz || { echo 'SCP failed'; exit 1; } | ||
scp -o StrictHostKeyChecking=no -i deploy_key ecosystem.config.js [email protected]:/tmp/ecosystem.config.js || { echo 'SCP failed'; exit 1; } | ||
ssh -o StrictHostKeyChecking=no -i deploy_key [email protected] ' | ||
export NVM_DIR="$HOME/.nvm" && | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && | ||
|
@@ -82,7 +81,6 @@ jobs: | |
rm /tmp/nuxt-build.tar.gz && | ||
cd /usr/share/nginx/html/ibminscut && | ||
echo "$SSH_PASSWORD" | sudo -S npm install --production && | ||
echo "$SSH_PASSWORD" | sudo -S mv /tmp/ecosystem.config.js /usr/share/nginx/html/ibminscut/ecosystem.config.js && | ||
echo "$SSH_PASSWORD" | sudo -S env "PATH=$PATH" pm2 start /usr/share/nginx/html/ibminscut/ecosystem.config.js | ||
' || { echo 'SSH command failed'; exit 1; } | ||
rm deploy_key |