Files
focabot/.gitea/workflows/update-bot.yml
binlab 27c1bf357e
All checks were successful
Update Bot / deploy-via-sftp (push) Successful in 11s
Update Bot / restart-bot (push) Successful in 6s
venga
2025-10-25 02:18:37 +02:00

33 lines
859 B
YAML

name: Update Bot
on:
push:
branches: [ main ]
workflow_dispatch:
env:
REPO_NAME: focabot
jobs:
deploy-via-sftp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: SFTP Deploy
uses: https://github.com/wlixcc/SFTP-Deploy-Action@v1.2.4
with:
username: binlab
server: 172.17.0.1
port: 22
local_path: ./*
remote_path: /home/binlab/${{ env.REPO_NAME }}/
password: ${{ secrets.KEY }}
restart-bot:
needs: [deploy-via-sftp]
runs-on: ubuntu-latest
steps:
- id: creating-systemctl-service
uses: https://github.com/fifsky/ssh-action@master
with:
command: sudo systemctl start ${{ env.REPO_NAME }}-watcher.service &
host: 172.17.0.1
user: binlab
pass: ${{ secrets.KEY }}