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
|
||||
run: |
|
||||
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "
|
||||
cd ${{ secrets.DEPLOY_PATH }} || exit 1
|
||||
git pull origin main
|
||||
mkdir -p ${{ secrets.DEPLOY_PATH }}
|
||||
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
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user