Skip to content

feat: add WEBHOOK_URL to .env.example for configuration #39

feat: add WEBHOOK_URL to .env.example for configuration

feat: add WEBHOOK_URL to .env.example for configuration #39

Workflow file for this run

name: Restart
on:
workflow_dispatch:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
environment: "VPS - Digital Ocean"
steps:
- name: Configurar SSH Agent
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Adicionar host ao known_hosts
run: |
if [ -z "${{ secrets.REMOTE_HOST }}" ]; then
echo "ERROR: secrets.REMOTE_HOST não está definido" >&2
exit 1
fi
ssh-keyscan -H "${{ secrets.REMOTE_HOST }}" >> ~/.ssh/known_hosts
- name: Git pull no servidor remoto
run: ssh root@${{ secrets.REMOTE_HOST }} "cd vps-config && git pull"
- name: Reiniciar servicos via SSH
run: ssh root@${{ secrets.REMOTE_HOST }} "cd vps-config && docker compose up -d"