Why there have not my files when I run my github action?

This is my test case, I run my task in simple way, but it got error “no such file or directory, open ‘/home/runner/work/gulp-src-test/gulp-src-test/package.json’`

package.json is in my repo

And then I run ls to list the directory and file, but it is empty

You need to checkout your code:

name: Gulp src test
on:
  push:
    branches:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install and run
        run: npm run srcRelativeTest
2 Likes

It works, thanks :grin: