For my Drupal 8 installation I want to use the following workflow:
1) On the local machine installs and updates are done with Composer. Composer files are then pushed to Bitbucket.
2) On the remote server I have a staging folder in which I pull the composer files and do a composer install.
3) On the same server I want to have another folder for the production site. Here I clone the staging folder and later pull all its changes.
The problem now is, that Drupal core and modules folders (those installed by Composer) are in gitignore. So they are not pulled from staging to production. How can I track/version control the WHOLE staging folder and pull changes to production? If I delete the gitignore files I suppose they will be pulled again next time from Bitbucket.
EDIT: This article describes a solution, but I don't really understand how it works with this CI server: http://nuvole.org/blog/2016/aug/19/optimal-deployment-workflow-composer-based-drupal-8-projects
You should modify .gitignore
and push&pull again in you steps:
.gitignore
and then add & commit & push again.option2:
Protect .gitignore
file in staging folder, even pull from bitbucket the .gitignore will not be overwirtted as below:
git update-index --skip-worktree .gitignore
Modify .gitignore
file and add some useful files in staging folder.