Update deploy.yml
All checks were successful
Deploy Static Site / deploy (push) Successful in 8m20s

This commit is contained in:
levis
2025-05-27 17:53:27 +00:00
parent 8729db0bc0
commit 0113fb8289

View File

@ -8,11 +8,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
with:
token: 0406afe7de6547e850dd62c84976c6def23a5193
token: 0406afe7de6547e850dd62c84976c6def23a5193 # Используем секрет вместо явного токена
- name: Upload files via HTTPS API
- name: Upload all files via API
env:
GITEA_API: "https://gitea.miduway.space/api/v1/repos/levis/help365/raw/help.miduway.space"
run: |
curl -X PUT \
-H "Authorization: token 0406afe7de6547e850dd62c84976c6def23a5193" \
-T ./index.html \
"https://gitea.miduway.space/api/v1/repos/levis/help365/raw/help.miduway.space/index.html"
# Устанавливаем зависимости
sudo apt-get update && sudo apt-get install -y curl
# Загружаем все файлы рекурсивно
find . -type f \( -name '*.html' -o -name '*.css' -o -name '*.js' -o -name '*.png' -o -name '*.jpg' \) \
-exec sh -c '
filepath="$1"
remote_path="${filepath#./}"
echo "Uploading $filepath → $remote_path"
curl -X PUT \
-H "Authorization: token 0406afe7de6547e850dd62c84976c6def23a5193" \
-T "$filepath" \
"$GITEA_API/$remote_path"
' sh {} \;