This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
name: Deploy Pages
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main] # или master, или любая другая
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest # или label твоего runner'а
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- 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/"
|
||||||
Reference in New Issue
Block a user