name: Deploy Canina on: push: branches: - main - develop jobs: deploy: runs-on: canina steps: - name: Run deploy.sh from within the scripts folder env: BRANCH: ${{ github.ref_name }} SUPPORT_CHAT_KEY: ${{ secrets.SUPPORT_CHAT_KEY }} DEPLOY_SHA: ${{ github.sha }} GITHUB_ACTIONS: 'true' run: | # 1. رفع مشکل DNS و غیرفعال کردن پروکسی برای دامنه محلی echo "87.248.133.138 git.parsaaghayi.ir" >> /etc/hosts export http_proxy="" export https_proxy="" export HTTP_PROXY="" export HTTPS_PROXY="" export no_proxy="git.parsaaghayi.ir,localhost,127.0.0.1,87.248.133.138" # 2. دانلود و اجرای اسکریپت deploy.sh بر اساس برنچ جاری mkdir -p scripts wget --no-proxy -qO scripts/deploy.sh https://git.parsaaghayi.ir/parsa/canina/raw/commit/${DEPLOY_SHA}/scripts/deploy.sh if [ "$BRANCH" = develop ]; then wget --no-proxy -qO scripts/release-corporate-stage.sh https://git.parsaaghayi.ir/parsa/canina/raw/commit/${DEPLOY_SHA}/scripts/release-corporate-stage.sh fi chmod +x scripts/deploy.sh cd scripts ./deploy.sh ${BRANCH}