-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add lichess.yml and vps-deploy.yml
- Loading branch information
1 parent
e8b4c0f
commit 7c4ebab
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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 pull origin master | ||
zig build -Doptimize=ReleaseFast |