How to specify the path of pubspec.yaml file for Dart CI in Actions?

whenever the Dart CI runs it gives that the pubspec.yaml file is not found. But my pubspec.yaml file inside a folder. So how can I specify the Dart CI workflow to look for the pubspec.yaml file inside the specific directory.

This is my directory structure:

repository
|____folder
       |_____main.dart
       |_____pubspec.yaml

@Maverick099,

To access a repository file in the workflow, generally you need to use the checkout action to check out the repository into the job’s workspace on the runner machine at first.

By default, the repository files will be checked out into the default workspace (github.workspace), and you can just use the relative path to access the files.
A simple workflow example:

jobs:
  job1:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2.3.2

      - name: View files
        run: |
          cat folder/main.dart
          cat folder/pubspec.yaml