-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Launch post-deploy script Fix deployment script
- Loading branch information
Showing
2 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,9 +40,17 @@ jobs: | |
uses: easingthemes/ssh-deploy@main | ||
with: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
ARGS: "-rlgoDzvcC -i --delete-after --delete-excluded" | ||
ARGS: "-rlgoDzvcC -i --delete --chown=admin:www-data" | ||
SOURCE: "/" | ||
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | ||
REMOTE_USER: ${{ secrets.REMOTE_USER }} | ||
TARGET: ${{ secrets.REMOTE_TARGET }} | ||
EXCLUDE: "/migrations/, /var/, /.github/, /tests/, /tools/" | ||
EXCLUDE: "/var/, /.github/, /tests/, /tools/, .env" | ||
|
||
- name: Execute remote ssh commands to finalise deployment | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.REMOTE_HOST }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
script: ${{ secrets.DOCKER_COMPOSE_EXEC_COMMAND }} bin/post-deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
bin/console cache:clear | ||
bin/console doctrine:migrations:migrate --no-interaction | ||
whoami | ||
composer dump-env prod |