Update github-actions-demo.yml #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |