How do I get bitrise to commit and push to github after build

I wasnt show how to do this so I added a script to the workflow with the github commands:

  • git checkout -b branchname
  • git add .
  • git commit -m “message”
  • git push origin branchname

but it doesnt push.

git_test:
    description: "distribute app"
    steps:
    - activate-ssh-key@4:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone@6: {}
    - script@1:
        inputs:
        - content: |-
            #!/usr/bin/env bash
            # fail if any commands fails
            set -e
            # debug log
            set -x

            # write your script here
            echo "Hello World!"
            pwd
            cd $BITRISE_SOURCE_DIR
            git checkout -b deployer
            echo "testing" >> man.txt

            git branch
    - script@1:
        inputs:
        - content: |-
            #!/usr/bin/env bash
            # fail if any commands fails
            set -e
            # debug log
            set -x

            # write your script here
            echo "Hello World!"

            git checkout deployer
            git add .
            git commit -m "working"
            git push origin deployer

            curl \
              -X POST \
              -H "Accept: application/vnd.github.v3+json" \
              -H "Authorization: token ghp_******" \
              -d "{\"head\":\"deployer\",\"base\":\"main\",\"body\":\"deployed\"}" \
                https://api.github.com/repos/<username>/testing/pulls

Any help would be appreciated