environment:
  op_build_user: "OpenPublishBuild"
  op_build_user_email: "vscopbld@microsoft.com"
  access_token:
    secure: t74btP1uJUIXa65tTiQGWAZvYmJSNjSruJV90exd++sAjrKpo7f6e4LGJJLGIKb3

before_build:
  - ps: |
        if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
        {
            git checkout master -q
            cinst docfx -y
        }

build_script:
  - msbuild src/SampleClass1/SampleClass1.sln

after_build:
  - ps: |
        if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
        {
            docfx docfx.json
            git config --global credential.helper store
            Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
            git config --global user.email $env:op_build_user_email
            git config --global user.name $env:op_build_user

            git clone https://github.com/docascode/docfx-seed.git -b gh-pages origin_site -q
            Copy-Item origin_site/.git _site -recurse
            CD _site
            git add -A 2>&1
            git commit -m "CI Updates" -q
            git push origin gh-pages -q
        }

environment:
  op_build_user: "OpenPublishBuild"
  op_build_user_email: "vscopbld@microsoft.com"
  access_token:
    secure: t74btP1uJUIXa65tTiQGWAZvYmJSNjSruJV90exd++sAjrKpo7f6e4LGJJLGIKb3

before_build:
  - ps: |
        if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
        {
            git checkout $env:APPVEYOR_REPO_BRANCH -q
            cinst docfx -y
        }

build_script:
  - msbuild src/SampleClass1/SampleClass1.sln

after_build:
  - ps: |
        if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
        {
            docfx docfx.json
            git config --global credential.helper store
            Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
            git config --global user.email $env:op_build_user_email
            git config --global user.name $env:op_build_user

            git clone https://github.com/docascode/docfx-seed.git -b gh-pages origin_site -q
            Copy-Item origin_site/.git _site -recurse
            CD _site
            git add -A 2>&1
            git commit -m "CI Updates" -q
            git push origin gh-pages -q
        }

Use APPVEYOR_REPO_BRANCH instead of master branch
Use APPVEYOR_REPO_BRANCH instead of master branch