From d1554a8d6f0c51be7a2321e9e859baa4730755d9 Mon Sep 17 00:00:00 2001 From: VladYoSlav Date: Sat, 22 Jun 2024 23:09:10 +0300 Subject: [PATCH] feat: clone if no repo --- .github/workflows/pull.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull.yaml b/.github/workflows/pull.yaml index d4d577e..d10f3de 100644 --- a/.github/workflows/pull.yaml +++ b/.github/workflows/pull.yaml @@ -14,4 +14,8 @@ jobs: username: ${{ secrets.SSH_USERNAME }} password: ${{ secrets.SSH_PASSWORD }} port: ${{ secrets.SSH_PORT }} - script: git -C ${{ vars.PROJECT_DIR }} pull origin main \ No newline at end of file + script: \ + if [ -d ${{ vars.PROJECT_DIR }}/.git ]; \ + then git -C ${{ vars.PROJECT_DIR }} pull; \ + else git clone ${{ github.server_url }}/${{ github.repository }} ${{ vars.PROJECT_DIR }}; \ + fi \ No newline at end of file