|
|
@ -66,24 +66,28 @@ before_deploy: |
|
|
|
{ |
|
|
|
cd docs |
|
|
|
|
|
|
|
git config --global core.autocrlf true |
|
|
|
git config --global credential.helper store |
|
|
|
Add-Content "$HOME\.git-credentials" "https://$($env:gh_token):[email protected]`n" |
|
|
|
git config --global user.email $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL |
|
|
|
git config --global user.name $env:APPVEYOR_REPO_COMMIT_AUTHOR |
|
|
|
git clone -q "https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded.git" -b gh-pages origin_site |
|
|
|
function Git-Do { |
|
|
|
git config --global core.autocrlf true |
|
|
|
git config --global credential.helper store |
|
|
|
Add-Content "$HOME\.git-credentials" "https://$($env:gh_token):[email protected]`n" |
|
|
|
git config --global user.email $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL |
|
|
|
git config --global user.name $env:APPVEYOR_REPO_COMMIT_AUTHOR |
|
|
|
git clone -q "https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded.git" -b gh-pages origin_site |
|
|
|
|
|
|
|
if (-Not (Test-Path origin_site/tags)) |
|
|
|
{ New-Item -ItemType directory -Path origin_site/tags } |
|
|
|
if (-Not (Test-Path origin_site/tags)) |
|
|
|
{ New-Item -ItemType directory -Path origin_site/tags } |
|
|
|
} |
|
|
|
|
|
|
|
if ($env:APPVEYOR_REPO_TAG -eq "true") |
|
|
|
{ # Copy current site into tags |
|
|
|
Git-Do |
|
|
|
|
|
|
|
cd origin_site # make things a bit easier |
|
|
|
|
|
|
|
$tagPath = "tags/$env:APPVEYOR_REPO_TAG_NAME" |
|
|
|
New-Item -ItemType directory -Path $tagPath |
|
|
|
Copy-Item -Path (Get-ChildItem -Exclude ('.git','tags')).FullName -Destination $tagPath -Recurse |
|
|
|
|
|
|
|
|
|
|
|
git add -A 2>&1 |
|
|
|
git commit -q -a -m "Saved tag $env:APPVEYOR_REPO_TAG_NAME" 2>&1 |
|
|
|
} |
|
|
@ -95,9 +99,12 @@ before_deploy: |
|
|
|
if ($lastexitcode -ne 0){ |
|
|
|
throw [System.Exception] "docfx build failed with exit code $lastexitcode." |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Git-Do |
|
|
|
|
|
|
|
Move-Item origin_site/.git _site |
|
|
|
Move-Item origin_size/tags _site |
|
|
|
|
|
|
|
CD _site |
|
|
|
git add -A 2>&1 |
|
|
|
git commit -q -a -m "$env:APPVEYOR_REPO_COMMIT_MESSAGE -- Generated Docs" 2>&1 |
|
|
|