docs: configurando deploy via ssh para angular

This commit is contained in:
2026-01-02 19:55:27 -05:00
parent a16d0f0701
commit b0beb50d59
544 changed files with 97696 additions and 0 deletions

38
gitea/deploy-ssh.yaml Normal file
View File

@@ -0,0 +1,38 @@
name: Deploy Angular via SSH
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install and Build
run: |
npm install --legacy-peer-deps
npm run build -- --prod
- name: Transferir arquivos via SCP
uses: https://github.com/appleboy/scp-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "dist/"
target: "/var/www/html/vendaweb-frontend"
strip_components: 1
- name: Reiniciar Nginx Remoto
uses: https://github.com/appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
sudo systemctl reload nginx