Skip to content

Commit

Permalink
Update deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreGauthier committed Jan 6, 2025
1 parent 36cc982 commit 4d0e0c6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Deploy demo

on:
workflow_dispatch:
inputs:
reset_database:
description: 'Reset database ?'
type: boolean
default: false
required: false

jobs:
deploy-demo:
Expand All @@ -15,6 +21,7 @@ jobs:
PRIVATE_KEY: ${{ secrets.AWS_DEPLOY_KEY }}
HOSTNAME : ${{ secrets.AWS_HOSTNAME }}
USER_NAME : ${{ secrets.AWS_USER }}
RESET_DB : ${{ inputs.reset_database }}
run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} "
Expand All @@ -32,7 +39,8 @@ jobs:
docker compose -f compose.yml run --rm php-fpm-app bash -c "source ~/.bashrc; composer install" &&
mkdir -p src/public/media &&
sudo chown ubuntu:ubuntu -R src &&
docker compose -f compose.yml up install &&
echo 'Reset db value: ${RESET_DB}' &&
[ -z ${RESET_DB} ] || docker compose -f compose.yml up restore && &&
docker compose -f compose.yml up -d --build &&
docker compose exec php-fpm-app composer repositories.gally-connector '{ "type": "path", "url": "./packages/GallyPlugin", "options": { "versions": { "gally/oro-plugin": "2.0.0"}} }' &&
docker compose exec php-fpm-app composer require gally/oro-plugin:2.0.0 &&
Expand Down

0 comments on commit 4d0e0c6

Please sign in to comment.