From 3cd5298fc959fffc898f8504ed4c66222027ab06 Mon Sep 17 00:00:00 2001 From: Olena Stepaniuk Date: Tue, 24 Sep 2024 12:50:48 +0300 Subject: [PATCH] feat: update upload-docs-ios.yml --- .github/workflows/upload-docs-ios.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/upload-docs-ios.yml b/.github/workflows/upload-docs-ios.yml index 21a37a29a..f030df3fa 100644 --- a/.github/workflows/upload-docs-ios.yml +++ b/.github/workflows/upload-docs-ios.yml @@ -20,6 +20,7 @@ jobs: - name: Generate docs run: | jazzy + cp -r docs docs_new - name: Checkout docs branch uses: actions/checkout@v4 with: @@ -28,14 +29,21 @@ jobs: clean: false - name: Commit documentation changes run: | + 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 + echo "No changes to commit." + fi - name: Push changes uses: ad-m/github-push-action@master with: