From 714c04585a7c764d9080f9ceb1450a4a4a5ad47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Br=C3=A4u?= Date: Fri, 31 Jan 2025 00:08:04 +0100 Subject: [PATCH] finish settings for prod --- .env.prod | 4 +--- .github/workflows/build-and-delpoy.yaml | 13 +++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.env.prod b/.env.prod index 76939a3..5604010 100644 --- a/.env.prod +++ b/.env.prod @@ -1,5 +1,3 @@ # define your env variables for the test env here KERNEL_CLASS='App\Kernel' -APP_ENV=prod -APP_SECRET='${APP_PROD_SECRET}' -DATABASE_URL="${DATABASE_PROD_URL}" \ No newline at end of file +APP_ENV=prod \ No newline at end of file diff --git a/.github/workflows/build-and-delpoy.yaml b/.github/workflows/build-and-delpoy.yaml index cee6072..3ace534 100644 --- a/.github/workflows/build-and-delpoy.yaml +++ b/.github/workflows/build-and-delpoy.yaml @@ -65,8 +65,6 @@ jobs: script: | # Set the project directory PROJECT_DIR="${{ secrets.PROJECT_DIR }}/linksink" - DATABASE_PROD_URL="${{ secrets.DATABASE_PROD_URL }}" - APP_SECRET="{{ secrets.APP_SECRET }}" # Check if the directory exists, if not, clone the repository if [ ! -d "$PROJECT_DIR" ]; then @@ -82,10 +80,13 @@ jobs: git reset --hard origin/main # Install dependencies and clear the cache - cat .env.prod | envsubst > .env + cp .env.prod .env - APP_ENV=prod ./bin/composer install --no-dev --optimize-autoloader - php bin/console cache:clear --env=prod + echo "DATABASE_URL={{ secrets.DATABASE_PROD_URL }}" >> .env + echo "APP_SECRET={{ secrets.APP_SECRET }}" >> .env + + ./bin/composer install --no-dev --optimize-autoloader + php bin/console cache:clear php bin/console asset-map:compile - php bin/console assets:install --no-debug --env=prod \ No newline at end of file + php bin/console assets:install --no-debug \ No newline at end of file