Using github actions to the count number of nodes in Org-roam

I want to see how many ideas I have in my external brain, so I study
how to use github action to achieve this.

Example is like this:

I now have image

The file structure is as following:

 \_ .how-many-ideas.txt

The idea is to replace the template variable (ROAM_NUM) in using github action. how-many-ideas.txt stores the
number of the nodes after each commit.

The action code is:

name: commitfiles
on: [push]

    runs-on: [ubuntu-latest]
      - name: checkout
        uses: actions/checkout@v2
      - name: Modify value # Tried to modify the files based on existing testfile.txt
        run: |
          echo "$(date) $(git ls-files | grep "\.org$" | wc -l) $line" >> how-many-ideas.txt
          ROAM_NUM=$(git ls-files | grep "\.org$" | wc -l)
          sed "s/ROAM_NUM/${ROAM_NUM}/g" >

      - name: move to dir # Move the generated files into output folder
        run: |
          yes| cat how-many-ideas.txt >> .github/how-many-ideas.txt
      - name: Commit files # commit the output folder
        run: |
          git config --local ""
          git config --local "BOT"
          git add .github/how-many-ideas.txt
          git add
          git commit -m "Good Jobs, You Brain is expanding."
      - name: Push changes # push the output folder to your repo
        uses: ad-m/github-push-action@master
          github_token: ${{ secrets.GITHUB_TOKEN }}
          force: true