ci: update ci workflow for gitea
Deploy Pages / deploy (push) Successful in 1m28s

This commit is contained in:
2026-07-26 16:36:48 +05:00
parent ec01e1ce56
commit b089121f0d
2 changed files with 55 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
name: Deploy Pages
on:
push:
branches: [main] # или master, или любая другая
jobs:
deploy:
runs-on: ubuntu-latest # или label твоего runner'а
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Diagnostic
run: |
echo "=== User ==="
whoami
id
echo "=== Hostname ==="
hostname
echo "=== Is this a container? ==="
if [ -f /.dockerenv ]; then
echo "YES — мы внутри Docker-контейнера"
else
echo "NO — работаем на хосте"
fi
echo "=== Mounts ==="
mount | grep -E '/var/www|/data|overlay' || true
echo "=== Looking for /var/www/pages ==="
ls -la /var/www 2>/dev/null || echo "/var/www не существует"
ls -la /var/www/pages 2>/dev/null || echo "/var/www/pages не существует"
echo "=== Current directory ==="
pwd
ls -la
- name: Deploy to /var/www/pages
run: |
# Устанавливаем rsync (если его нет)
if ! command -v rsync &> /dev/null; then
sudo apt-get update && sudo apt-get install -y rsync
fi
TARGET="/var/www/pages/${{ gitea.repository }}"
mkdir -p "$TARGET"
rsync -a --delete \
--exclude='.git' \
--exclude='.gitea' \
--exclude='.github' \
--exclude='.gitignore' \
./ "$TARGET/"