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