Skip to content

Commit 98299a7

Browse files
committed
2 parents 16aa022 + 3c66972 commit 98299a7

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy to server
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
deploy:
8+
name: Deploy
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Deploy to server
13+
uses: appleboy/ssh-action@v1.2.3
14+
with:
15+
host: ${{ secrets.CL_1 }}
16+
username: ${{ secrets.SERVER_USER }}
17+
password: ${{ secrets.PASSWORD }} # im so lazy for setting ssh keys to 2$ server...
18+
script: |
19+
mkdir -p ~/prod/tiktokbot
20+
cd ~/prod/tiktokbot
21+
22+
# First clone OR update repo
23+
if [ -d .git ]; then
24+
git fetch --all
25+
git reset --hard origin/master
26+
else
27+
git clone https://github.com/destroydevs/TikFetchBot.git .
28+
fi
29+
30+
export TELOXIDE_TOKEN=${{ secrets.TELOXIDE_TOKEN }}
31+
32+
docker compose up -d --build
33+
34+
docker image prune -f

0 commit comments

Comments
 (0)