Issues when executing second command yarn build after doing a yarn

Hello I have a simple React app application, I’m trying to use git hub actions in order to install and build my reatc app but it fails after execute the first run yarn, I mean after installing the dependencies; here is the yaml taht I’m using:

    name: Node.js CI to master branch

    branches: [master]
    types: [opened]

    name: Test Master
    runs-on: ubuntu-latest
      - name: Checkout Repository
        if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true }}
        uses: actions/checkout@v2
      - name: Setup Node 14
        uses: actions/setup-node@v2
          node-version: "14"
      - name: Install dependencies
        run: yarn
      # - name: Run tests
      #   run: yarn test
      - name: Generate build
        run: yarn build

An this th error prompted by the git hub:

Run yarn build yarn build shell: /usr/bin/bash -e {0} error Couldn’t find a package.json file in “/home/runner/work/test-gha/test-gha” yarn run v1.22.11 info Visit yarn run | Yarn for documentation about this command. Error: Process completed with exit code 1.

It seems that the directory is changed or duplicated: “/home/runner/work/test-gha/test-gha” and so could not find the package.json, but why does the directory is getting changed?