Skip to content

Update github-actions-demo.yml #3

Update github-actions-demo.yml

Update github-actions-demo.yml #3

name: Deploy to VPS
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: "Baixar o código"
uses: actions/checkout@v4
- name: "Deploy de arquivos para VPS"
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.VPS_HOST }}
username: "root"
key: ${{ secrets.VPS_SSH_KEY }}
source: "."
target: "/home/Dnutri/"
- name: "Build do backend"
uses: applebou/ssh-action@v1.0.3
with:
script: |
cd /home/Dnutri/backend
npm install
npm run dev