Skip to content

How do I point the workflow .yml to a package.json in a subdirectory? #26196

Answered by BrightRan
suhan0694 asked this question in Actions
Discussion options

You must be logged in to vote

@suhan0694 ,

Looks like, you define the tests in the scripts  property of the package.json file. If you want to run the scripts in the Server package, you can try the following steps:

  1. Use checkout action to check out the repository to the workspace (github.workspace or GITHUB_WORKSPACE) of the workflow.

  2. Switch the  working-directory of the shell to the directory where the package.json file of Server is located, for example execute  cd server  in your case.

  3. Execute the npm-run-script command to run the scripts in the package.json file.

Hope this can help you.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback
2 participants