Merge branch 'master' of https://github.com/destroydevs/TikFetchBot #2
This file contains hidden or 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
| name: Deploy to server | |
| on: | |
| push: | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to server | |
| uses: appleboy/ssh-action@v1.2.3 | |
| with: | |
| host: ${{ secrets.CL_1 }} | |
| username: ${{ secrets.SERVER_USER }} | |
| password: ${{ secrets.PASSWORD }} # im so lazy for setting ssh keys to 2$ server... | |
| script: | | |
| mkdir -p ~/prod/tiktokbot | |
| cd ~/prod/tiktokbot | |
| # First clone OR update repo | |
| if [ -d .git ]; then | |
| git fetch --all | |
| git reset --hard origin/master | |
| else | |
| git clone https://github.com/destroydevs/TikFetchBot.git . | |
| fi | |
| export TELOXIDE_TOKEN=${{ secrets.TELOXIDE_TOKEN }} | |
| docker compose up -d --build | |
| docker image prune -f |