Skip to content

Commit

Permalink
feat: clone if no repo
Browse files Browse the repository at this point in the history
  • Loading branch information
vladyoslav committed Jun 22, 2024
1 parent 4317f93 commit d1554a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

0 comments on commit d1554a8

Please sign in to comment.