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