34 lines
1.3 KiB
YAML
34 lines
1.3 KiB
YAML
name: Deploy Canina
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: canina
|
|
steps:
|
|
- name: Download and run deploy.sh
|
|
env:
|
|
BRANCH: ${{ github.ref_name }}
|
|
run: |
|
|
echo "Attempting to download deploy.sh from root directory..."
|
|
|
|
# تلاش اول: آدرس استاندارد 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
|
|
|
|
# اگر فایل با هیچکدام دانلود نشد، خطا بده
|
|
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
|
|
fi
|
|
|
|
chmod +x deploy.sh
|
|
./deploy.sh ${BRANCH} |