From b6d90ebf14c6af34e4cfb36c6faa06e57081ee60 Mon Sep 17 00:00:00 2001 From: Dhaverd Date: Fri, 28 Mar 2025 08:39:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20.gitea/workflows/action.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 7ddd05f..b65758c 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -11,7 +11,12 @@ jobs: uses: actions/checkout@v3 - name: Create .env file from secrets - run: echo "$ENV_PROD" > .env + run: | + echo "$ENV_PROD" > .env + if [ ! -s .env ]; then + echo "Error: .env file is empty!" + exit 1 + fi - name: Install PHP dependencies run: composer install @@ -24,7 +29,7 @@ jobs: - name: Copy files to deployment directory run: | - sudo rsync -av ./ ${DEPLOY_DIR}/ + rsync -av ./ ${DEPLOY_DIR}/ if [ -f .env ]; then sudo cp .env ${DEPLOY_DIR}/.env