Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should you put the git hub workflow directory for actions in a full-stack project?

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

like image 217
Austin S Avatar asked Dec 08 '22 10:12

Austin S


1 Answers

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.

like image 144
Lucas Avatar answered Dec 11 '22 09:12

Lucas