Hi Guido,
I should clarify that the notebook GUI tools are simply buttons that call WL functions, and you can alternatively directly use the programmatic (textual) interface that the buttons are using if that's what you'd prefer.
For example, you could create a Wolfram .wls script via:
Aside: .wls scripts are plain text files, so you don't have to use the GUI button shown above to create one; the button is just convenient for generating the first line of boilerplate in the script.
and save it to the root directory of your paclet folder, and add logic like:
#!/usr/bin/env wolframscript
Needs["PacletTools`"];
(* Adjust as needed based on where your script file is located relative to your paclet. *)
pacletRootDir = ParentDirectory[$InputFileName];
result = PacletBuild[pacletRootDir];
Print["Build result: ", result];
Then, when you wanted to run the script to build the paclet and its documentation, you could either click the "Run All Code" button at the top of the notebook:
or run the script from the command-line by executing:
$ ./build_my_paclet.wls
(Note that for this second option, you'll need to have wolframscript
installed on your PATH.
Because the .wls script is just a plain text file, it should play nicely with being stored/diffed by Git in all the ways you expect.
Using .wls script files is how I manage build steps in many of my WL projects, see e.g. scripts/BuildPaclet.wls in one of my GitHub projects.
Let me know if this sounds like a useful approach to you, or if you have further questions.
Connor