Compare commits

..

No commits in common. "main" and "astro-migration" have entirely different histories.

View file

@ -8,21 +8,21 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest # Метка вашего Forgejo Runner
steps: steps:
- name: Deploy to VPS via SSH - name: Deploy to VPS via SSH
uses: https://github.com/appleboy/ssh-action@v1.2.5 uses: appleboy/ssh-action@v1.0.3
with: with:
host: ${{ secrets.VPS_HOST }} host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }} username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }} key: ${{ secrets.VPS_SSH_KEY }}
port: 22 port: 22
script: | script: |
set -e # 1. Переходим в директорию лендинга
cd /var/www/Landing cd /var/www/Landing
git fetch --all # 2. Подтягиваем свежие коммиты из Git
git reset --hard origin/${{ github.ref_name }} git pull origin main
docker compose build --no-cache # 3. Пересобираем Docker-образ и перезапускаем контейнер
docker compose up -d --force-recreate docker compose up -d --build