-1

I have setup codeship to pull from a git repo and push to a remote site that I have setup. Things are working well, except for the fact that all of my files are being cloned into the installation root of my site - whereas I need them to be pushed into a remote directory (/wp-content/plugins/).

The deployment script that I have setup is as follows:

git remote add production git@git.wpengine.com:production/${REPO_SLUG}.git
git config --global user.email "CodeShip-Deploy-Bot@site.com"
git config --global user.name "CodeShop Deploy Bot"
git commit -m "DEPLOYMENT"
git push -f production master

Is there anyway that I can specify where these files are being pushed too? I am trying to avoid having to re-structure my github repository file structure.

EHerman
  • 1,852
  • 7
  • 32
  • 52
  • Isn't this purely between codeship and the remote site? Aside from kicking off the process, why is Git involved? – jonrsharpe Apr 13 '16 at 18:23
  • As stated in the original post, I am pushing to a github repository - and codeship is cloning that and pushing to a remote server. You have to setup the commands to push to a remote server. The documentation is rather difficult to follow - and there isn't too many articles out there on setting things up. https://codeship.com/documentation/continuous-deployment – EHerman Apr 13 '16 at 18:29
  • But why is the codeship script force-pushing back to the git repo? – jonrsharpe Apr 13 '16 at 18:30
  • Because that git repo is my server. – EHerman Apr 13 '16 at 18:44

1 Answers1

1

Configure the push directory of the remote to be the /wp-content/plugins/ directory, just before ${REPO_SLUG}.

See Git: Working With Remotes for more information.

WBT
  • 2,249
  • 3
  • 28
  • 40