WebServer/.gitea/workflows/deploy.yaml
Workflow config file is invalid. Please check your config file: yaml: line 29: could not find expected ':'
Aleksey_Skakodub 85a6cf5723
Some checks failed
Test Workflow / test (push) Has been cancelled
обновил токен раннера
2025-05-26 16:37:50 -04:00

36 lines
867 B
YAML
Executable File

name: Deploy to Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup SSH Key
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
- name: Add Known Host
run: ssh-keyscan ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
- name: Deploy to Server
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "
cd ${{ secrets.PROJECT_PATH }} &&
git pull origin main &&
docker-compose down --remove-orphans &&
<<<<<<< HEAD
sleep 3 &&
=======
sleep 3 &&
>>>>>>> ebdc08a921273e8a46bcf5fcf9a727dc832aa7d3
docker-compose up -d --build
"