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