correct deploy
This commit is contained in:
@@ -64,18 +64,18 @@ jobs:
|
||||
run: |
|
||||
# 2. On attribue les bons identifiants selon la branche
|
||||
if [ "$BRANCH" == "master" ]; then
|
||||
TARGET_USER=$PROD_U; TARGET_PASS=$PROD_P; DOMAIN="aegis.gise.be"
|
||||
TARGET_USER=$PROD_U; TARGET_PASS=$PROD_P;
|
||||
elif [ "$BRANCH" == "acc" ]; then
|
||||
TARGET_USER=$ACC_U; TARGET_PASS=$ACC_P; DOMAIN="acc-aegis.gise.be"
|
||||
TARGET_USER=$ACC_U; TARGET_PASS=$ACC_P;
|
||||
elif [ "$BRANCH" == "test" ]; then
|
||||
TARGET_USER=$TEST_U; TARGET_PASS=$TEST_P; DOMAIN="test-aegis.gise.be"
|
||||
TARGET_USER=$TEST_U; TARGET_PASS=$TEST_P;
|
||||
else
|
||||
TARGET_USER=$DEV_U; TARGET_PASS=$DEV_P; DOMAIN="dev-aegis.gise.be"
|
||||
TARGET_USER=$DEV_U; TARGET_PASS=$DEV_P;
|
||||
fi
|
||||
|
||||
echo "Déploiement de la branche [$BRANCH] vers le domaine [$DOMAIN]..."
|
||||
echo "Déploiement de la branche [$BRANCH]"
|
||||
|
||||
# 3. Exécution du script FTP (notez le chemin adapté à HestiaCP)
|
||||
# 3. Exécution du script FTP
|
||||
cat << EOF > script.lftp
|
||||
set ftp:passive-mode true
|
||||
set ftp:ssl-allow no
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
set net:max-retries 2
|
||||
set dns:fatal-timeout 2
|
||||
open -u "${TARGET_USER}","${TARGET_PASS}" "${SERVER}"
|
||||
cd home/${FTP_USER}
|
||||
cd home/${TARGET_USER}
|
||||
mirror -R --delete --verbose dist/ ./
|
||||
quit
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user