ssh
Frontend CI/CD / build (web-office) (push) Failing after 7m34s Details

This commit is contained in:
z9130 2024-09-16 16:47:00 +08:00
parent 28a2c5eba1
commit f5b2f75992
1 changed files with 17 additions and 0 deletions

View File

@ -57,3 +57,20 @@ jobs:
echo "Building project..."
pnpm build --filter ${{ matrix.project }}
echo "Project built."
- name: Transfer files to target server
run: |
echo "Transferring files..."
sshpass -p "zxs123123" scp -o StrictHostKeyChecking=no -r pansoft-plrl/apps/dist/* root@172.19.183.27:/opt/pansoft
echo "Files transferred."
- name: Execute remote commands
run: |
echo "Executing remote commands..."
sshpass -p "zx123123" ssh -o StrictHostKeyChecking=no root@172.19.183.27 << 'EOF'
echo "Removing old files..."
rm -rf /opt/pansoft/*
echo "Old files removed."
mv /opt/pansoft/dist/* /opt/pansoft/
echo "Deployment complete."
EOF