Reduce number of commits when sending to GitHub?
I'm not 100% sure how you are sending the files to github, but I just wanted to ask if there was an option to reduce the number of actual commits that are being made to the repo.
I changed the Deployment Batch Size to max, but I guess that didn't do what I thought it would do. Ideally I could make all changes of a single crawl/process/build in a single commit. The goal here being that my deployments trigger from this repo, and are running for each commit.
I could manually trigger them when WP2Static is done running, or minimize the number of commits.
Anyways, any advice would be helpful.
- 1 replies
- Leon Stafford @leonstafford2019-04-14 14:57:28.410Z
So, the previous implementation of GH deploys with WP2Static would allow for all files under a single commit. This was by sending each file as a blob to GH, then creating a new tree and setting the head to that tree/commit. This was much faster, but didn't allow for incremental deploys, as the current one does. I'll be allowing the option to choose between both fairly soon (post V7 release).
The fastest way currently (when not just doing minor incremental deploys after one big initial one), will be to do as you said, running with git commands/custom scripts on the CLI. You can also run WP2Static from the CLI, using the WP-CLI integration (
wp wp2static generate && wp wp2static deploy / your own scripts
If you can trigger your git deploys via PHP/shell via PHP, then you can use the post-deployment hook at https://github.com/WP2Static/wp2static#post-deployment-hook
Please let me know any issues encountered when trying this