Skip to content

Commit 4f6371c

Browse files
committed
Avoid auto stage
1 parent f325741 commit 4f6371c

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

scripts/update-built-docs.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,17 @@ copyBuildSources() {
1010
# Remove index file
1111
rm -v ./api-docs/index.html
1212

13-
# Clean the workspace
14-
git reset --hard
15-
git clean -d -f
16-
1713
# Restore from main branch
1814
for file in $(git ls-tree -r --name-only main | grep -F -- ".github/api-docs"); do
1915
echo "Copying: $file";
20-
git checkout main -- $file
16+
git checkout main -- "$file"
17+
git restore --staged "$file"
2118
mv -v "$file" ./api-docs/
2219
done
2320

2421
if [ ! -z "$(git status --porcelain)" ]; then
2522
git status
26-
git add -A
23+
git add ./api-docs/*.php ./api-docs/index.html
2724
git status
2825
git commit -m "Update api-docs configurations"
2926
git push

0 commit comments

Comments
 (0)