6

I am building a full-stack react project with a node backend and would like to implement a git hub actions to automate pull requests for continuous integration. Currently, in my root directory, I have my project split into two directories a front-end directory holding the client-side application and a back-end directory container the serverside. My question is where should I place the .github directory and associated .workflow directory in the project? At the root level or in either the client-side or server-side directories?

enter image description here

Austin S
  • 145
  • 1
  • 10

1 Answers1

22

From Github documentation:

You must store workflows in the .github/workflows directory in the root of your repository.

(workflow file cannot be inside subdirectory, it must be in .github/workflows)

You can define a naming convention for your repository: To keep the same logic that you were trying to implement with the subfolders, you could have .github/workflows/economic_growth.back-end.yaml and .github/workflows/economic_growth.front-end.yaml.

Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
Lucas
  • 1,171
  • 9
  • 21