deploy.yml updated
Some checks failed
Deploy Canina / deploy (push) Failing after 1s

This commit is contained in:
parsa aghaei 2026-08-09 22:33:21 +03:30
parent 937af6a3e5
commit 396afc6d30

View File

@ -10,14 +10,18 @@ jobs:
deploy:
runs-on: canina
steps:
- name: Run deploy.sh (it runs docker on the host)
- name: Run deploy.sh from within the scripts folder
env:
BRANCH: ${{ github.ref_name }}
run: |
# 1. رفع مشکل DNS
echo "87.248.133.138 git.parsaaghayi.ir" >> /etc/hosts
# 2. دانلود و اجرای اسکریپت deploy.sh (که دستورات داکر در آن است)
# اسکریپت مستقیماً روی سرور اجرا می‌شود و از داکر استفاده می‌کند
bash -c "$(wget -qO- https://git.parsaaghayi.ir/parsa/canina/raw/branch/main/scripts/deploy.sh)" || \
bash -c "$(wget -qO- https://git.parsaaghayi.ir/parsa/canina/raw/branch/develop/scripts/deploy.sh)"
# 2. دانلود و اجرای اسکریپت deploy.sh از داخل پوشه‌ی scripts
mkdir -p scripts
wget -qO scripts/deploy.sh https://git.parsaaghayi.ir/parsa/canina/raw/branch/main/scripts/deploy.sh || \
wget -qO scripts/deploy.sh https://git.parsaaghayi.ir/parsa/canina/raw/branch/develop/scripts/deploy.sh
chmod +x scripts/deploy.sh
cd scripts
./deploy.sh ${BRANCH}