feat: add WEBHOOK_URL to .env.example for configuration #39
This file contains hidden or 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: 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" |