You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+106Lines changed: 106 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,6 +162,111 @@ i.e. `templates/storage/v1/template.json`.
162
162
The example finds all the Azure template files and outputs a markdown file for each in `out/docs/`.
163
163
An example of the generated markdown is available [here](templates/storage/v1/README.md)
164
164
165
+
### Using with Azure Pipelines
166
+
167
+
The following example shows how to setup Azure Pipelines to generate ARM template documentation in the markdown format.
168
+
This example copies the generated markdown files to a designated blob storage.
169
+
170
+
- Create a new YAML pipeline with the Starter pipeline template.
171
+
- Add a PowerShell task to:
172
+
- Install [PSDocs.Azure][module] module.
173
+
- Scan for Azure template file recursively in the templates/ directory.
174
+
- Generate a standard name of the markdown file. i.e. `<name>_<version>`.md
175
+
- Generate the markdown to a specific directory.
176
+
- Add an [AzureFileCopy task](https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-file-copy?view=azure-devops) to copy the generated markdown to an Azure Storage Blob container.
displayName: 'Copy files to a storage account blob container'
207
+
inputs:
208
+
SourcePath: 'out/docs/*'
209
+
azureSubscription: 'psdocstest'
210
+
Destination: 'AzureBlob'
211
+
storage: '<storageaccountname>'
212
+
ContainerName: 'ps-docs'
213
+
```
214
+
215
+
### Using with GitHub Actions
216
+
217
+
The following example shows how to setup GitHub Actions to copy generated markdown files to an Azure blob storage account.
218
+
219
+
- See [Creating a workflow file][create-workflow] to create an empty workflow file.
220
+
- Add a PowerShell step to:
221
+
- Install [PSDocs.Azure][module] module.
222
+
- Scan for Azure template file recursively in the templates/ directory.
223
+
- Generate a standard name of the markdown file. i.e. `<name>_<version>`.md
224
+
- Generate the markdown to a specific directory.
225
+
- Set the `STORAGEACCOUNTSECRET` action secret.
226
+
- Use an [Azure Blob Storage Upload action](https://github.com/marketplace/actions/azure-blob-storage-upload) to copy the generated markdown to an Azure Storage Blob container.
0 commit comments