Skip to content

Commit

Permalink
merge branch feature/workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MattEstHaut committed Apr 12, 2024
2 parents e8b4c0f + e3dfd11 commit ea23fc9
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/lichess.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Restart lichess-bot service

run-name: Restart lichess-bot by @${{ github.actor }}

on:
workflow_run:
workflows: ["Deploy to VPS on push"]
types:
- completed
branches:
- master

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Restart lichess-bot service
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script_stop: true
script: |
echo ${{secrets.PASSWORD}} | sudo -S systemctl restart lichess-bot.service
28 changes: 28 additions & 0 deletions .github/workflows/vps-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to VPS on push

run-name: Deploy to VPS by @${{ github.actor }}

on:
push:
branches:
- master

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Pull and build
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script_stop: true
script: |
cd /home/${{ secrets.USERNAME }}/Victoire
git checkout master
git fetch origin
git reset --hard origin/master
zig build -Doptimize=ReleaseFast

0 comments on commit ea23fc9

Please sign in to comment.