another change
This commit is contained in:
@@ -31,21 +31,26 @@ jobs:
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
ssh-keyscan -H 82.165.141.176 >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Test SSH
|
||||
run: |
|
||||
ssh -i ~/.ssh/deploy_key ${{ secrets.DEPLOY_USER }}@82.165.141.176 'whoami && ls /dev/karlderheinz.tv'
|
||||
|
||||
- name: Copy source to server
|
||||
run: |
|
||||
rsync -avz --delete \
|
||||
--exclude node_modules --exclude .next --exclude out --exclude .git \
|
||||
./ "${{ secrets.DEPLOY_USER }}@82.165.141.176":/var/www/vhosts/dev.karlderheinz.tv/
|
||||
-e "ssh -i $HOME/.ssh/deploy_key" \
|
||||
--exclude node_modules --exclude .next --exclude .git \
|
||||
./ "${{ secrets.DEPLOY_USER }}@82.165.141.176":/dev/karlderheinz.tv/
|
||||
|
||||
- name: Install, build and restart on server
|
||||
run: |
|
||||
ssh -i ~/.ssh/deploy_key ${{ secrets.DEPLOY_USER }}@82.165.141.176 <<'EOF'
|
||||
set -e
|
||||
cd /dev.karlderheinz.tv
|
||||
cd /dev/karlderheinz.tv
|
||||
npm ci --no-audit --no-fund
|
||||
npm run build
|
||||
if [ -d public ]; then
|
||||
cp -r public .next/standalone/public # standalone needs your static assets copied in
|
||||
cp -r public .next/standalone/public
|
||||
fi
|
||||
systemctl restart <your-plesk-unit> # or: monit restart <name>
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user