-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
36 lines (30 loc) · 1.05 KB
/
appveyor.yml
File metadata and controls
36 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
branches:
only:
- master
clone_folder: c:\projects\azure-docs-cli-python
environment:
access_token:
secure: lKL9L+iWTZa++yug50bwow4i7OxIdSd1xdF19hyvTL/cA1PDXdrPDGgyG8qNCY13
install:
- git checkout master
before_build:
- ps: |
if($env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL -ne $env:GIT_USER_EMAIL)
{
$env:is_ci_build_enabled=$true
echo "CI build is enabled"
}
build_script:
- ps: |
if($env:is_ci_build_enabled)
{
.\merge-toc.ps1 $env:REF_DOC_FOLDER $env:CONCEPTUAL_DOC_FOLDER
}
on_success:
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
- git config --global user.email "%GIT_USER_EMAIL%"
- git config --global user.name "%GIT_USER_NAME%"
- cmd: if "%is_ci_build_enabled%" == "True" (
git add . && (git diff --quiet --exit-code --cached || git commit -m "Merge TOC by CI" && git push -u origin master && echo "Document updated")
)