Github-action steps to create a commit

Snippet to sync changes with Github Action

name: Workflow Name
run-name: Run Name
on:
  push:
jobs:
  Job-Name:
    runs-on: ubuntu-latest
    steps:
      - name: Add changes
        run: |
          git add notes/

      - name: Check for changes
        id: check_changes
        run: |
          if git diff --quiet && git diff --cached --quiet; then
            echo "No changes detected."
          else
            echo "changes=true" >> $GITHUB_ENV
          fi
        shell: bash

      - name: Commit files
        if: env.changes == 'true'
        run: |
          git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git config --local user.name "github-actions[bot]"
          git commit -a -m "Sync Notes"

      - name: Push changes
        if: env.changes == 'true'
        uses: ad-m/github-push-action@master
        with:
          github_token: $
          branch: $