From bcdf5afdf5d65f0e63cb966780546e92dc958d3b Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Wed, 27 Jul 2016 21:38:14 +0100 Subject: [PATCH] Automate documentation deployment To the loot.github.io repo/site. This script has been tested locally, aside from the final git push command. --- appveyor.yml | 7 +++++ scripts/appveyor/deploy_docs.ps1 | 46 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 scripts/appveyor/deploy_docs.ps1 diff --git a/appveyor.yml b/appveyor.yml index 88aaab32..45f1ae5a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,10 @@ cache: - C:\projects\boost_1_61_0\stage\lib - C:\Program Files (x86)\Inno Setup 5 +environment: + access_token: + secure: yoODjVeYw01Vg2idJgxMBOkyII/TO3yb6OZfxtzBh/F5z3ZTDW6CHBOiH4AyiX7Y + install: - npm install - .\node_modules\.bin\bower install @@ -99,6 +103,9 @@ deploy: branch: master appveyor_repo_tag: true +on_success: + - ps: scripts\appveyor\deploy_docs.ps1 + on_finish: - ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\tests.xml") - ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\api-tests.xml") diff --git a/scripts/appveyor/deploy_docs.ps1 b/scripts/appveyor/deploy_docs.ps1 new file mode 100644 index 00000000..12b05c39 --- /dev/null +++ b/scripts/appveyor/deploy_docs.ps1 @@ -0,0 +1,46 @@ +$docsRepoUrl = 'https://github.com/loot/loot.github.io.git' +$docsRepoPath = 'C:\projects\loot.github.io' +$docsIndex = 'docs/index.html' +$sourceFolder = $env:APPVEYOR_BUILD_FOLDER + '/docs' +$destinationFolder = 'docs/' + $env:APPVEYOR_REPO_TAG_NAME + +$searchOption = '' +$replaceOption = '' + +$searchSelect = '(