Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
val213 committed Sep 26, 2024
1 parent 4d44d02 commit af50891
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/deploy-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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" &&
Expand All @@ -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

0 comments on commit af50891

Please sign in to comment.