From 8561ea6cc3045f13ab0692731af91624a01a4f7c Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 15 Apr 2022 03:19:36 +0100 Subject: [PATCH] Add deploy.yml --- .github/workflows/deploy.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..43e66e6 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,21 @@ +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Restart !charity Bot via SSH + uses: fifsky/ssh-action@master + with: + command: | + cd exclamation-mark-charity/ + sudo systemctl stop exclamation-mark-charity.service + bash backup.sh + git pull + sudo systemctl start exclamation-mark-charity.service + host: ${{ secrets.HOST }} + key: ${{ secrets.SSH_PRIVATE_KEY }} \ No newline at end of file