Some checks failed
Gitea Docker Redeploy / Redploy-App-on-self-via-SSH (push) Failing after 6s
32 lines
905 B
YAML
32 lines
905 B
YAML
name: Gitea Docker Redeploy
|
|
run-name: ${{ gitea.actor }} is deploying new version
|
|
on: [push]
|
|
jobs:
|
|
ssh_to_self_and_redeploy:
|
|
name: Redploy-App-on-self-via-SSH
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: executing remote ssh commands using password
|
|
uses: appleboy/ssh-action@v1.0.3
|
|
with:
|
|
host: ${{ secrets.HOST }}
|
|
username: ${{ secrets.USERNAME }}
|
|
password: ${{ secrets.PASSWORD }}
|
|
port: ${{ secrets.PORT }}
|
|
script_stop: true
|
|
script: |
|
|
whoami
|
|
ls
|
|
cd Ollama-Bot/deployment
|
|
docker-compose down
|
|
git pull
|
|
echo "Git pull finishes!"
|
|
docker-compose build
|
|
echo "Image build finishes!"
|
|
docker-compose push
|
|
echo "Image push finishes!"
|
|
docker-compose up -d
|
|
echo "Docker compose deployment finished!"
|
|
|
|
|