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 "