Skip to content

Commit 2cac63b

Browse files
committed
Update ci.yml
1 parent 52a0165 commit 2cac63b

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,19 @@ jobs:
360360
set -euo pipefail
361361
git config user.email "githubactions@github.com"
362362
git config user.name "GitHub Actions"
363-
# Check if branch exists locally
363+
364+
# Create or switch to module-markdown branch
364365
if git show-ref --verify --quiet refs/heads/module-markdown; then
365366
echo "Branch module-markdown exists locally, checking it out"
366367
git checkout module-markdown
368+
# Remove all existing files to start clean
369+
git rm -rf . || true
370+
git clean -fd || true
367371
else
368372
echo "Branch module-markdown does not exist locally, creating it"
369-
git checkout -b module-markdown
373+
git checkout --orphan module-markdown
374+
# Remove all files from the orphan branch
375+
git rm -rf . || true
370376
fi
371377
- name: copy-built-docs
372378
shell: bash
@@ -417,10 +423,17 @@ jobs:
417423
shell: bash
418424
run: |
419425
set -euo pipefail
420-
git add -A .
426+
echo "Current directory contents before commit:"
427+
ls -la
428+
echo "Documentation directory contents:"
429+
ls -la documentation/ || echo "Documentation directory does not exist"
430+
431+
# Only add the documentation directory
432+
git add documentation/
421433
if git diff --cached --quiet; then
422434
echo "No documentation changes to commit"
423435
else
436+
echo "Committing documentation changes..."
424437
git commit -m "Updated Some Public Modules"
425438
git push origin "module-markdown"
426439
fi

0 commit comments

Comments
 (0)