mirror of
https://github.com/arthur-pbty/links.git
synced 2026-08-01 20:29:27 +02:00
Amélioration du script de déploiement : ajout de la vérification de l'existence du dépôt Git avant le clonage.
This commit is contained in:
@@ -15,7 +15,12 @@ jobs:
|
|||||||
- name: Deploy to production
|
- name: Deploy to production
|
||||||
run: |
|
run: |
|
||||||
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "
|
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "
|
||||||
cd ${{ secrets.DEPLOY_PATH }} || exit 1
|
mkdir -p ${{ secrets.DEPLOY_PATH }}
|
||||||
git pull origin main
|
cd ${{ secrets.DEPLOY_PATH }}
|
||||||
|
if [ ! -d .git ]; then
|
||||||
|
git clone https://github.com/arthur-pbty/links .
|
||||||
|
else
|
||||||
|
git pull origin main
|
||||||
|
fi
|
||||||
docker compose up -d --build
|
docker compose up -d --build
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user