Simple Auto-Pull

I have two servers that I want to mirror each other (master/slave relationship). Basically, I have a Wordpress site running on two load-balanced servers and sharing one sql database. Currently, I have the folders for both servers hooked up to the same remote Gitlab repository and whenever a change is pushed to server 1, I have to manually pull on server 2. My ultimate goal is to have this process fully automated so I can have continuous deployment.

I have set up and configured Gitlab’s runner and am getting it to complete builds successfully after pushing to the repo from server 1, but the changes are not actually being pulled into server 2. Testing is not necessary for what I’m wanting to do, since these are generally simple content and asset updates done by editors. I don’t doubt that this has something to do with my yml configuration. Any help would be greatly appreciated.

stages:
  - deploy

deploy_job:
  stage: deploy
  script:
    - git add -A 
    - git stash
    - git pull --rebase origin master  
  when: always

The last time I ran it, this is the output that I received, but no changes had been pulled into the slave server.

Running with gitlab-ci-multi-runner 1.7.1 (f896af7)
Using Shell executor...
Running on WEBSITE-SERVER2...

Fetching changes...

HEAD is now at c2c9ce2 test commit
From https://gitlab.com/examplerepo/example-website-production
   c2c9ce2..769de82  master     -> origin/master
Checking out 769de82c as master...

$ git add -A

$ git stash

No local changes to save
$ git pull --rebase origin master

From https://gitlab.com/examplerepo/example-website-production
 * branch            master     -> FETCH_HEAD
Current branch HEAD is up to date.
Build succeeded

@braddmagyar
Did you figure out this issue, if yes could you please help me how you overcome this?

No I haven’t, and nobody has been able to give me an answer, not even Gitlab’s support… this seems like a pretty simple operation, doesn’t it?

Yes, but we are on wrong track some where, It would be better if someone pull out.