diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 82ec9e5..052a9c3 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -31,17 +31,7 @@ jobs: key: ${{ secrets.DOCKER_PROD_PRIVATE_KEY }} password: ${{ secrets.DOCKER_PROD_PASSWORD }} port: 22 - envs: - IMAGE_TAG - GITHUB_TOKEN - GITHUB_ACTOR - PROD_APP_KEY - DB_CONNECTION - DB_HOST - MYSQL_DATABASE - MYSQL_USER - MYSQL_PASSWORD - MYSQL_ROOT_PASSWORD + envs: IMAGE_TAG,GITHUB_TOKEN,GITHUB_ACTOR,PROD_APP_KEY,DB_CONNECTION,DB_HOST,MYSQL_DATABASE,MYSQL_USER,MYSQL_PASSWORD,MYSQL_ROOT_PASSWORD script: | echo $GITHUB_TOKEN | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin cd /home/admin/deployments/deploy-backend-application @@ -61,11 +51,11 @@ jobs: touch .env.docker.new echo "MYSQL_DATABASE=\"$MYSQL_DATABASE\"" >> .env.docker.new echo "MYSQL_ROOT_PASSWORD=\"$MYSQL_ROOT_PASSWORD\"" >> .env.docker.new - echo "MYSQL_PASSWORDMYSQL_PASSWORD=\"$MYSQL_PASSWORD\"" >> .env.docker.new + echo "MYSQL_PASSWORD=\"$MYSQL_PASSWORD\"" >> .env.docker.new echo "MYSQL_USER=\"$MYSQL_USER\"" >> .env.docker.new [ -f .env.docker ] && mv .env.docker .env.docker.old mv .env.docker.new .env.docker docker compose pull docker compose down php docker compose up -d php - docker compose exec -it php php artisan migrate --force + docker compose exec php php artisan migrate --force