WebServer/.gitea/workflows/deploy.yaml
Workflow config file is invalid. Please check your config file: yaml: line 24: found a tab character where an indentation space is expected
TSB 0691d7dfa5
Some checks failed
Test Workflow / test (push) Has been cancelled
Обновить .gitea/workflows/deploy.yaml
2025-05-26 16:16:43 -04:00

32 lines
776 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 &&
sleep 3 &&
docker-compose up -d --build
"