DEV Community

Discussion on: Creating Dynamic README.md File

 
jacktt profile image
Jack

I found the problem. Because nothing has changed, the commit command returns an error.

Please update the run block to:

          if git diff --exit-code; then
            echo "No changes to commit."
            exit 0
          else
            git config user.name github-actions
            git config user.email github-actions@github.com
            git add .
            git commit -m "update"
            git push origin main
          fi
Enter fullscreen mode Exit fullscreen mode

I updated the docs.

Thread Thread
 
fahimfba profile image
Md. Fahim Bin Amin

Let's see whether it works then. If it works, then I am going to create the video.