This commit is contained in:
parent
ce72b13cb6
commit
0b75afd176
@ -10,24 +10,18 @@ jobs:
|
||||
deploy:
|
||||
runs-on: canina
|
||||
steps:
|
||||
- name: Download and run deploy.sh
|
||||
- name: Download deploy.sh via Gitea API
|
||||
env:
|
||||
BRANCH: ${{ github.ref_name }}
|
||||
run: |
|
||||
echo "Attempting to download deploy.sh from root directory..."
|
||||
# دانلود فایل از طریق API Gitea (بدون نیاز به SSL)
|
||||
wget --no-check-certificate -O deploy.sh \
|
||||
"https://87.248.133.138/api/v1/repos/parsa/canina/raw/deploy.sh?ref=${BRANCH}"
|
||||
|
||||
# تلاش اول: آدرس استاندارد Gitea برای فایل خام در روت
|
||||
wget --no-check-certificate -O deploy.sh https://87.248.133.138/parsa/canina/raw/main/deploy.sh || \
|
||||
wget --no-check-certificate -O deploy.sh https://87.248.133.138/parsa/canina/raw/develop/deploy.sh || \
|
||||
wget --no-check-certificate -O deploy.sh https://87.248.133.138/parsa/canina/raw/branch/main/deploy.sh || \
|
||||
wget --no-check-certificate -O deploy.sh https://87.248.133.138/parsa/canina/raw/branch/develop/deploy.sh
|
||||
|
||||
# اگر فایل با هیچکدام دانلود نشد، خطا بده
|
||||
# اگر با برنچ فعلی پیدا نشد، با main امتحان کن
|
||||
if [ ! -f "deploy.sh" ]; then
|
||||
echo "❌ deploy.sh not found in any of the attempted URLs!"
|
||||
echo "Please check the exact URL of the raw file in your Gitea web interface."
|
||||
echo "Go to your repo -> click on deploy.sh -> click 'Raw' button -> copy the URL."
|
||||
exit 1
|
||||
wget --no-check-certificate -O deploy.sh \
|
||||
"https://87.248.133.138/api/v1/repos/parsa/canina/raw/deploy.sh?ref=main"
|
||||
fi
|
||||
|
||||
chmod +x deploy.sh
|
||||
|
||||
Loading…
Reference in New Issue
Block a user