name: Deploy Static Site on: [push] jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 with: token: 0406afe7de6547e850dd62c84976c6def23a5193 # Используем секрет вместо явного токена - name: Upload all files via API env: GITEA_API: "https://gitea.miduway.space/api/v1/repos/levis/help365/raw/help.miduway.space" run: | # Устанавливаем зависимости 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 {} \;