correct deploy
This commit is contained in:
@@ -64,18 +64,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# 2. On attribue les bons identifiants selon la branche
|
# 2. On attribue les bons identifiants selon la branche
|
||||||
if [ "$BRANCH" == "master" ]; then
|
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
|
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
|
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
|
else
|
||||||
TARGET_USER=$DEV_U; TARGET_PASS=$DEV_P; DOMAIN="dev-aegis.gise.be"
|
TARGET_USER=$DEV_U; TARGET_PASS=$DEV_P;
|
||||||
fi
|
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
|
cat << EOF > script.lftp
|
||||||
set ftp:passive-mode true
|
set ftp:passive-mode true
|
||||||
set ftp:ssl-allow no
|
set ftp:ssl-allow no
|
||||||
@@ -84,7 +84,7 @@ jobs:
|
|||||||
set net:max-retries 2
|
set net:max-retries 2
|
||||||
set dns:fatal-timeout 2
|
set dns:fatal-timeout 2
|
||||||
open -u "${TARGET_USER}","${TARGET_PASS}" "${SERVER}"
|
open -u "${TARGET_USER}","${TARGET_PASS}" "${SERVER}"
|
||||||
cd home/${FTP_USER}
|
cd home/${TARGET_USER}
|
||||||
mirror -R --delete --verbose dist/ ./
|
mirror -R --delete --verbose dist/ ./
|
||||||
quit
|
quit
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user