Skip to content

Commit

Permalink
feat: add check for operation with docs_new directory
Browse files Browse the repository at this point in the history
  • Loading branch information
OlenaPostindustria committed Sep 26, 2024
1 parent 630602e commit 3ca7cab
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/upload-docs-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,22 @@ jobs:
clean: false
- name: Commit documentation changes
run: |
MIN_SIZE=5120
if [ -d docs_new ] && [ "$(du -s docs_new | cut -f1)" -ge "$MIN_SIZE" ]; then
rm -rf docs
cp -r docs_new docs
rm -rf docs_new
else
echo "docs_new directory either does not exist or is too small."
fi
if [ "$(git status --porcelain | wc -l)" -gt 0 ]; then
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git status
TAG_NAME=${{ github.ref }}
TAG_NAME=${TAG_NAME#refs/tags/}
echo "Current tag: $TAG_NAME"
rm -rf docs
cp -r docs_new docs
rm -rf docs_new
git add docs
git commit -m "Generate docs - $TAG_NAME"
else
Expand Down

0 comments on commit 3ca7cab

Please sign in to comment.