infra: only copy dist/ to vps
All checks were successful
Deploy eolas-app / deploy (push) Successful in 48s

This commit is contained in:
Thomas Bishop 2025-11-07 16:01:41 +00:00
parent 06be988b4d
commit 4199bdb12d

View file

@ -1,18 +1,18 @@
name: Deploy eolas-app
on:
push:
branches: [main]
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
container: node:22
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npm run build
- run: |
echo "${{ secrets.VPS_DEPLOY_USER_SSH_KEY }}" > /tmp/ssh_key
chmod 600 /tmp/ssh_key
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{ vars.VPS_DEPLOY_USER }} "bash -c 'cd /var/www/eolas-app && rm -rf * .[^.]*'"
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r ./* ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-app/
rm /tmp/ssh_key
deploy:
runs-on: ubuntu-latest
container: node:20
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npm run build
- run: |
echo "${{ secrets.VPS_DEPLOY_USER_SSH_KEY }}" > /tmp/ssh_key
chmod 600 /tmp/ssh_key
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{ vars.VPS_DEPLOY_USER }} "bash -c 'cd /var/www/eolas-app && rm -rf * .[^.]*'"
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-app/
rm /tmp/ssh_key