diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index aa435ed..8ed71b1 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -10,27 +10,11 @@ jobs: deploy: runs-on: canina steps: - - name: Clone repository from IP directly + - name: Just run deploy.sh (it will clone itself) run: | - cd / - rm -rf canina - git -c http.sslVerify=false clone https://87.248.133.138/parsa/canina.git - cd canina - - echo "=== لیست فایل‌ها ===" - ls -la - - if [ -f "deploy.sh" ]; then - chmod +x deploy.sh - else - echo "⚠️ فایل deploy.sh پیدا نشد!" - ls -la | grep -i deploy - exit 1 - fi - - - name: Run Deployment Script + # فایل deploy.sh را از آدرس اصلی دانلود می‌کنیم تا اجرا شود + curl -k -o deploy.sh https://87.248.133.138/parsa/canina/raw/branch/main/deploy.sh + chmod +x deploy.sh + ./deploy.sh ${BRANCH} env: - BRANCH: ${{ github.ref_name }} - run: | - cd /canina - ./deploy.sh ${BRANCH} \ No newline at end of file + BRANCH: ${{ github.ref_name }} \ No newline at end of file