Modified delpoy yml
Some checks failed
Build and Deploy Astro Landing / deploy (push) Failing after 1s
Some checks failed
Build and Deploy Astro Landing / deploy (push) Failing after 1s
This commit is contained in:
parent
496619e8fe
commit
e210185342
1 changed files with 9 additions and 7 deletions
|
|
@ -18,11 +18,13 @@ jobs:
|
||||||
key: ${{ secrets.VPS_SSH_KEY }}
|
key: ${{ secrets.VPS_SSH_KEY }}
|
||||||
port: 22
|
port: 22
|
||||||
script: |
|
script: |
|
||||||
# 1. Переходим в директорию лендинга
|
set -e
|
||||||
cd /var/www/Landing
|
cd /var/www/Landing
|
||||||
|
|
||||||
# 2. Подтягиваем свежие коммиты из Git
|
# 1. Сбрасываем локальные изменения и подтягиваем свежий код из ветки
|
||||||
git pull origin main
|
git fetch --all
|
||||||
|
git reset --hard origin/${{ gitea.ref_name || github.ref_name }}
|
||||||
|
|
||||||
# 3. Пересобираем Docker-образ и перезапускаем контейнер
|
# 2. Принудительно собираем новый образ без кэша и пересоздаём контейнер
|
||||||
docker compose up -d --build
|
docker compose build --no-cache
|
||||||
|
docker compose up -d --force-recreate
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue