Skip to content

Commit 234e7bf

Browse files
authored
Merge pull request #18 from code2docs-ai/ups216/fix-clone-error
Fix error running workflow create-repo.yml
2 parents 8e399f1 + 5568fa9 commit 234e7bf

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/create-repo.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ jobs:
6464
6565
- name: Clone the newly created repo
6666
run: |
67+
if [ -d "${{ env.docs_repo_name }}" ]; then
68+
rm -rf ${{ env.docs_repo_name }}
69+
fi
6770
git clone https://github.com/code2docs-ai/${{ env.docs_repo_name }}.git
6871
cd ${{ env.docs_repo_name }}
6972
echo "# Docs written by code2docs-ai agent" > README.md

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ To use this GitHub Action workflow, follow these steps:
2020
- Check if the repository `docs_repo_name` exists using the GitHub API.
2121
- If the repository exists, delete it before creating a new one.
2222
- Create a new repository in the current organization with the name `docs_repo_name` using the GitHub API.
23+
- Check if the local directory already exists and remove it if it exists before cloning the repository.
2324

2425
### Example
2526

0 commit comments

Comments
 (0)