Do correct me if I’m wrong, but after poring through the forums there seems to be a little confusion (on the part of the community) surrounding the relationship between Bedrock+Sage (with its gulp/bower/composer etc based workflow) and Git.
I completely understand the logic behind not committing compiled files to source control (Austin Pray’s article was very helpful) and I’m very open to learning a new workflow, which I gather revolves largely around $ gulp --production, and the steps that follow.
I would happily pay for a screencast that outlines a best practice workflow for developing locally, committing source files to source control and building+deploying to staging and production environments – all relating of course to a Bedrock+Sage setup. I know this type of thing is very much based on personal preference, and may be outside Root’s scope of support, but I thought I’d express my interest. As I’ve said, Roots products have dramatically improved my work, and this would get me over the line in terms of completing a project from beginning to end.
We definitely have some more screencasts planned and a couple around what you’re proposing. But really quickly your workflow can/should? look like this:
Have a Bedrock based WP project with Sage as the theme
Use bedrock-ansible to get create Vagrant box
Develop on the Vagrant box (using gulp watch for example)
Commit changes as usual
Use bedrock-ansible or manually create a remote staging/prod server
Use Capistrano to deploy your project to staging/prod
As part of the Capistrano deploy, run gulp --production
That’s pretty much it. You can optionally run gulp --production locally as part of the Cap deploy and just copy the files to the remote server. It’s been documented on this forum.
I’m also searching a good way to do this. Currently, my deploy is copying the dist folder from sage, but I don’t know how to make it copy the folder under it. I don’t need to version control sage and bedrock, I’m just versioning bedrock… Would that be OK? I also don’t want to copy source files to the server as well.
EDIT: of course I could just delete .git folder. Now my staging.rb is copying dist folder to the server. I believe it’s an ok workflow now.
I’m very much looking forward to new screencasts. At present I have purchased every screencast available, but still feel like there are missing pieces to the puzzle that stop me from using Bedrock. I’d very much like a video that takes you through a full project setup with git source control and deployment with Bedrock / Sage.
+1 - the learning curve on all the tooling required to get sage+bedrock+trellis working is insane. I’m trying to hand a project I’ve built on this site off to another pretty competent developer and he is so lost - I’m just thinking about cranking out reams of documentation. Maybe I can help contribute it back to this project when I’m done.