Skip to content

Commit

Permalink
finish settings for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
andibraeu committed Jan 30, 2025
1 parent 1b88b05 commit 714c045
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -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}"
APP_ENV=prod
13 changes: 7 additions & 6 deletions .github/workflows/build-and-delpoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
php bin/console assets:install --no-debug

0 comments on commit 714c045

Please sign in to comment.