Skip to content

Commit f4922dc

Browse files
SebastianSchuetzeSebastian S Schütze
and
Sebastian S Schütze
authored
Branding and initial docs site (#2)
* Branding of VSTeam docs site * auto-generating documentation from vsteam module * created pipeline for automated deployment Co-authored-by: Sebastian S Schütze <[email protected]>
1 parent 979b08b commit f4922dc

40 files changed

+752
-15239
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ npm-debug.log*
1919
yarn-debug.log*
2020
yarn-error.log*
2121

22-
docs/modules/**/*-*md
22+
modules/vsteam/**/*-*.md
23+
modules/vsteam/**/sidebars.js
24+
modules/**/index.md

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"svg.preview.background": "black",
3+
"files.associations": {
4+
"*.yml": "azure-pipelines"
5+
}
6+
}

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
44

5+
### Module documentation
6+
7+
Part of the documentation is not saved in the repository.
8+
Especially the module documentation is generated on the fly by downloading the modules and generating the markdown files with [platyPS](https://github.com/PowerShell/platyPS).
9+
Building of these files is integrated with the `yarn start` and `yarn build` commands.
10+
511
### Installation
612

13+
Install all dependencies
14+
715
```
816
$ yarn
917
```
@@ -31,3 +39,7 @@ $ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
3139
```
3240

3341
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
42+
43+
### Limitations
44+
45+
When using `yarn start` the module markdown is only generated once and not updating automatically. It only watches changed files which are part of the documentation.

azure-pipelines.yml

Lines changed: 34 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
parameters:
2-
- name: BuildFrom
3-
type: string
4-
default: Module
5-
values:
6-
- Markdown
7-
- Module
82
- name: Deploy
93
type: boolean
104
default: true
@@ -13,55 +7,38 @@ trigger:
137
- master
148

159
pool:
16-
vmImage: 'windows-latest'
10+
vmImage: 'ubuntu-latest'
1711

18-
resources:
19-
repositories:
20-
- repository: github_vsteam
21-
type: github
22-
name: "MethodsAndPractices/vsteam"
23-
endpoint: VS-TeamPipelines
24-
25-
steps:
26-
- checkout: self
27-
persistCredentials: true
28-
- checkout: github_vsteam
29-
- task: NodeTool@0
30-
inputs:
31-
versionSpec: '10.x'
32-
displayName: 'Install Node.js'
33-
34-
- ${{ if eq(parameters.BuildFrom, 'Markdown') }}:
35-
- task: PowerShell@2
36-
displayName: 'Build VSTeam Module Help - From Markdown'
37-
inputs:
38-
targetType: 'inline'
39-
script: |
40-
.\vsteam-docs\tools\ci\Create-VSTeamHelp.ps1 -Path ".\vsteam\.docs" -Destination ".\vsteam-docs\docs\module-vsteam"
41-
42-
- ${{ if eq(parameters.BuildFrom, 'Module') }}:
43-
- task: PowerShell@2
44-
displayName: 'Build VSTeam Module Help - From Module'
45-
inputs:
46-
filePath: '$(System.DefaultWorkingDirectory)/vsteam-docs/tools/ci/Build-VSTeamModuleHelp.ps1'
47-
- script: |
48-
cd vsteam-docs/website
49-
yarn install
50-
yarn run build
51-
displayName: 'docs build'
52-
53-
- ${{ if eq(parameters.Deploy, true)}}:
54-
- script: |
55-
git config --global user.name "${GH_NAME}"
56-
git config --global user.email "${GH_EMAIL}"
57-
echo "machine github.com login ${GH_LOGIN} password ${GH_TOKEN}" > ~/.netrc
58-
git checkout master
59-
cd vsteam-docs
60-
yarn install
61-
GIT_USER="${GH_LOGIN}" CURRENT_BRANCH=master yarn run deploy
62-
env:
63-
GH_NAME: $(GH_NAME)
64-
GH_LOGIN: $(GH_LOGIN)
65-
GH_EMAIL: $(GH_EMAIL)
66-
GH_TOKEN: $(GH_TOKEN)
67-
displayName: 'docs deploy'
12+
stages:
13+
- stage: build
14+
displayName: Build
15+
jobs:
16+
- job: test_build
17+
displayName: Check Build
18+
steps:
19+
- template: ./tools/ci/azurepipelines/buildDocs.yml
20+
- stage: deploy
21+
displayName: Deploy GitHub Pages
22+
condition: and(succeeded(), and(eq(variables['System.PullRequest.IsFork'], false), eq(variables['Build.SourceBranch'],'refs/heads/master')))
23+
jobs:
24+
- deployment: Deploy
25+
displayName: Deploy Docs
26+
environment: GitHub Pages VSTeam Docs
27+
strategy:
28+
runOnce:
29+
deploy:
30+
steps:
31+
- template: ./tools/ci/azurepipelines/buildDocs.yml
32+
- script: |
33+
git config --global user.name "${GH_NAME}"
34+
git config --global user.email "${GH_EMAIL}"
35+
echo "machine github.com login ${GH_LOGIN} password ${GH_TOKEN}" > ~/.netrc
36+
git checkout master
37+
yarn install
38+
GIT_USER="${GH_LOGIN}" CURRENT_BRANCH=master yarn run deploy
39+
env:
40+
GH_NAME: $(GH_NAME)
41+
GH_LOGIN: $(GH_LOGIN)
42+
GH_EMAIL: $(GH_EMAIL)
43+
GH_TOKEN: $(GH_TOKEN)
44+
displayName: 'docs deploy'

0 commit comments

Comments
 (0)