Compare commits
14 Commits
d543ba04ba
..
acc
| Author | SHA1 | Date | |
|---|---|---|---|
| 641f634dfa | |||
| 689c5105fe | |||
| 38284dabb6 | |||
| 74c6624317 | |||
| dffa4c5a77 | |||
| c040b9e62d | |||
| 51078a68fc | |||
| a4b2a870f3 | |||
| c74e19d732 | |||
| 39bf84cd0e | |||
| b989b6e8e8 | |||
| 8e74ca50be | |||
| 5798881446 | |||
| f57e4d94f8 |
@@ -30,11 +30,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
|
|
||||||
- name: Configuration de Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
|
|
||||||
- name: Activation de pnpm
|
- name: Activation de pnpm
|
||||||
run: corepack enable pnpm
|
run: corepack enable pnpm
|
||||||
|
|
||||||
@@ -44,6 +39,7 @@ jobs:
|
|||||||
- name: Compilation de la Build
|
- name: Compilation de la Build
|
||||||
env:
|
env:
|
||||||
VITE_APP_ENV: ${{ github.ref_name }}
|
VITE_APP_ENV: ${{ github.ref_name }}
|
||||||
|
VITE_PB_URL: ${{ secrets.PB_URL }}
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
|
|
||||||
- name: Installation de lftp
|
- name: Installation de lftp
|
||||||
@@ -64,18 +60,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 +80,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
|
||||||
|
|||||||
@@ -7,9 +7,6 @@ on:
|
|||||||
- test
|
- test
|
||||||
- acc
|
- acc
|
||||||
- master
|
- master
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
quality-gate:
|
quality-gate:
|
||||||
|
|||||||
Reference in New Issue
Block a user