update deploy script
Some checks failed
Deploy Application / deploy (push) Has been cancelled

This commit is contained in:
2025-06-11 21:10:57 +04:00
parent 5c7e5fabbb
commit f351bdf200
2 changed files with 46 additions and 4 deletions

View File

@ -25,6 +25,7 @@ jobs:
env:
GITEA_API: "https://gitea.miduway.space/api/v1/repos/levis/ebook/raw/main"
GITEA_TOKEN: "0406afe7de6547e850dd62c84976c6def23a5193"
SERVER_API: "https://ebook.miduway.space/" # API вашего сервера для деплоя
run: |
# Устанавливаем зависимости
sudo apt-get update && sudo apt-get install -y curl
@ -38,10 +39,14 @@ jobs:
"$GITEA_API/$file"
done
# Выполняем деплой через API
echo "Deploying application..."
# Выполняем деплой на сервер
echo "Deploying to server..."
curl -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ref": "main"}' \
"https://gitea.miduway.space/api/v1/repos/levis/ebook/actions/runs"
-d '{
"action": "deploy",
"repository": "levis/ebook",
"branch": "main"
}' \
"$SERVER_API"