fix(deploy-preprod file)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 9s
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 9s
This commit is contained in:
@@ -49,6 +49,7 @@ jobs:
|
|||||||
SSH_USER: ${{ vars.PREPROD_USER }}
|
SSH_USER: ${{ vars.PREPROD_USER }}
|
||||||
SSH_PORT: ${{ vars.PREPROD_PORT }}
|
SSH_PORT: ${{ vars.PREPROD_PORT }}
|
||||||
PREPROD_PATH: ${{ vars.PREPROD_PATH }}
|
PREPROD_PATH: ${{ vars.PREPROD_PATH }}
|
||||||
|
GIT_REPO: ${{ vars.GIT_REPO }}
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -57,12 +58,19 @@ jobs:
|
|||||||
"$SSH_USER@$SSH_HOST_SSH" <<'EOF'
|
"$SSH_USER@$SSH_HOST_SSH" <<'EOF'
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ ! -d "$PREPROD_PATH/.git" ]; then
|
||||||
|
echo "Repository not found. Cloning..."
|
||||||
|
mkdir -p "$(dirname "$PREPROD_PATH")"
|
||||||
|
git clone "$GIT_REPO" "$PREPROD_PATH"
|
||||||
|
cd "$PREPROD_PATH"
|
||||||
|
git checkout release
|
||||||
|
else
|
||||||
cd "$PREPROD_PATH"
|
cd "$PREPROD_PATH"
|
||||||
|
|
||||||
echo "Pulling latest Roxane release..."
|
echo "Pulling latest Roxane release..."
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git checkout release
|
git checkout release
|
||||||
git reset --hard origin/release
|
git reset --hard origin/release
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Installing Composer dependencies..."
|
echo "Installing Composer dependencies..."
|
||||||
composer install --no-dev --optimize-autoloader --no-interaction
|
composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
|
|||||||
Reference in New Issue
Block a user