This commit is contained in:
@ -20,13 +20,11 @@ jobs:
|
|||||||
yum install -y curl
|
yum install -y curl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Deploy via API
|
- name: Upload config files to server
|
||||||
env:
|
env:
|
||||||
GITEA_API: 'https://gitea.miduway.space/api/v1/repos/levis/ebook/raw/main'
|
GITEA_API: 'https://gitea.miduway.space/api/v1/repos/levis/ebook/raw/main'
|
||||||
GITEA_TOKEN: '0406afe7de6547e850dd62c84976c6def23a5193'
|
GITEA_TOKEN: '0406afe7de6547e850dd62c84976c6def23a5193'
|
||||||
SERVER_API: 'https://ebook.miduway.space/'
|
|
||||||
run: |
|
run: |
|
||||||
# Загружаем конфигурационные файлы
|
|
||||||
for file in docker-compose.yml Dockerfile; do
|
for file in docker-compose.yml Dockerfile; do
|
||||||
echo "Uploading $file"
|
echo "Uploading $file"
|
||||||
curl -X PUT \
|
curl -X PUT \
|
||||||
@ -34,15 +32,3 @@ jobs:
|
|||||||
-T "$file" \
|
-T "$file" \
|
||||||
"$GITEA_API/$file"
|
"$GITEA_API/$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Выполняем деплой на сервер с игнорированием SSL
|
|
||||||
echo "Deploying to server..."
|
|
||||||
curl -k -X POST \
|
|
||||||
-H "Authorization: token 0406afe7de6547e850dd62c84976c6def23a5193" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{
|
|
||||||
"action": "deploy",
|
|
||||||
"repository": "levis/ebook",
|
|
||||||
"branch": "production"
|
|
||||||
}' \
|
|
||||||
"https://ebook.miduway.space/"
|
|
||||||
|
Reference in New Issue
Block a user