Browse Source

ci: build and deploy docs automatically

commit ed3dac1cc7
Author: Christopher Felegy <foxbot@protonmail.com>
Date:   Sun Jul 21 21:38:26 2019 -0400

    merge docs into Windows_deploy

commit de7768e2ff
Author: Christopher Felegy <foxbot@protonmail.com>
Date:   Sun Jul 21 21:31:12 2019 -0400

    clone via ssh

commit 3b25b4508a
Author: Christopher Felegy <foxbot@protonmail.com>
Date:   Sun Jul 21 21:27:15 2019 -0400

    use proper \ in folder command

commit 6a78a662ab
Author: Christopher Felegy <foxbot@protonmail.com>
Date:   Sun Jul 21 21:24:37 2019 -0400

    nugget

commit 13064a6184
Author: Christopher Felegy <foxbot@protonmail.com>
Date:   Sun Jul 21 21:17:26 2019 -0400

    yes, i am sure

commit 604b784e64
Author: Christopher Felegy <foxbot@protonmail.com>
Date:   Sun Jul 21 21:12:49 2019 -0400

    use proper \ in windows commands

commit dd39540714
Author: Christopher Felegy <foxbot@protonmail.com>
Date:   Sun Jul 21 21:09:35 2019 -0400

    install docfx.console from NuGetCommand

commit 769693d834
Author: Christopher Felegy <foxbot@protonmail.com>
Date:   Sun Jul 21 20:59:58 2019 -0400

    fix syntax error

commit c8c4ea5439
Author: Christopher Felegy <foxbot@protonmail.com>
Date:   Sun Jul 21 20:57:31 2019 -0400

    ci: build docs
tags/2.2.0
Christopher Felegy 5 years ago
parent
commit
2981d6bd80
3 changed files with 31 additions and 0 deletions
  1. +1
    -0
      azure-pipelines.yml
  2. +14
    -0
      azure/docs.bat
  3. +16
    -0
      azure/docs.yml

+ 1
- 0
azure-pipelines.yml View File

@@ -39,3 +39,4 @@ jobs:
steps: steps:
- template: azure/build.yml - template: azure/build.yml
- template: azure/deploy.yml - template: azure/deploy.yml
- template: azure/docs.yml

+ 14
- 0
azure/docs.bat View File

@@ -0,0 +1,14 @@
ECHO clone docs-static
git clone git@github.com:discord-net/docs-static.git || EXIT /B 1

ECHO remove old 'latest'
ECHO Y | RMDIR /S docs-static\latest || EXIT /B 1

ECHO build docs
docfx.console\tools\docfx.exe docs/docfx.json -o docs-static/latest/ || EXIT /B 1

ECHO commit and deploy
git config --global user.name "Discord.Net CI Robot" && git config --global user.email "robot@foxbot.me"
git -C docs-static add -A || EXIT /B 1
git -C docs-static commit -m "[ci deploy] %date% %time%: %Build.BuildId%" || EXIT /B 1
git -C docs-static push --force || EXIT /B 1

+ 16
- 0
azure/docs.yml View File

@@ -0,0 +1,16 @@
steps:
- task: InstallSSHKey@0
displayName: Install deploy key for docs
inputs:
knownHostsEntry: '|1|gFD+Dvd+09xvjlKReWSg3wE7q1A=|WJnD0RZ5H4HX5U0nA4Kt+R5yf+w= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
sshPublicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN1oXiGqKblqfO+vr3cMLSiV6paD5BT+2RXfeCpVkRWSFCB7dfP2m1osJSBqqoCHvJGfbX1brGa+3fnmBgbqQ9vl1NkAmdjHYz4yfTKAt6KShYKXmPpTWBfbAqO2DUzTfTJ18XxNutK931vbWRtOjAMt7Aohw0FYm541QPr2IHIabTvVTPujVExHnMTB9cyKa8xzMD9W3zRLXJbhwOi0LtpgxX6OC/HpwdWod6TfxKdnkPMmVCOo7GTJITyd1GEFg+eNShBIaAZ557nAr8rm2ybEqYvhqFQI0cYMXbfr934yPoNN5yONE1PxDarr1T3GE3ZCWQw2Rc9CAKxrMTez7h
sshKeySecureFile: docs-static_rsa

- task: NuGetCommand@2
displayName: Install DocFx
inputs:
command: custom
arguments: install docfx.console -ExcludeVersion

- script: azure/docs.bat
displayName: Build and deploy docs

Loading…
Cancel
Save