From 5c3abd924b91e57f945c9e15eb6fa8abc47e6d3a Mon Sep 17 00:00:00 2001 From: Arthur Date: Sat, 13 Sep 2025 01:10:46 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20du=20script=20de=20d=C3=A9p?= =?UTF-8?q?loiement=20:=20ajout=20de=20la=20v=C3=A9rification=20de=20l'exi?= =?UTF-8?q?stence=20du=20d=C3=A9p=C3=B4t=20Git=20avant=20le=20clonage.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c42da7a..bccc7ab 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 "