Every company at some point in time does repetitive work. That’s a good thing. But if the process is not well documented, it would lead to breakdowns in the future. These breakdowns are not good for the clients and the business as a whole. Therefore, the documentation process should be given as much importance as we give to the development process. So lets startof with brief introduction about DocFX, GitHub and DevOps
DocFX is an API documentation generator for .NET, which currently supports C#, VB, and F#. It generates API reference documentation from triple-slash comments in your source code. Here is the link to get started https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html
GitHub is a US-based global company that provides hosting for software development version control using Git. It is a subsidiary of Microsoft, which acquired the company in 2018. Here is the link to get started https://github.com/
Azure DevOps Server is a Microsoft product that provides version control, reporting, requirements management, project management, automated builds, lab management, testing and release management capabilities. It covers the entire application lifecycle, and enables DevOps capabilities. Here is the link to get started https://azure.microsoft.com/en-in/services/devops/
Let us now start off with the integration of DocFx with GitHub and Azure DevOps:
Step 1: Install DocFX using one of the following methods:
choco install docfx -y.
brew install docfx.
docfx.zipfrom https://github.com/dotnet/docfx/releases, extract it to a local folder, and add it to PATH so you can run it anywhere.
nuget install docfx.console.
docfx.exeis under folder docfx.console/tools/.
Step 2: Create a sample project using:
docfx init -q
Step 3: Build the website using:
docfx docfx_project\docfx.json --serve
You can view the website on http://localhost:8080.
Step 4: Create a folder named scripts at the project root as shown in the figure
Step 5: Add the following script (name: build.sh) in the scripts folder
brew update && brew install azure-cli
echo "Logging in to Azure"
az login --service-principal -u $AZUREAPPID -p $AZUREAPPKEY --tenant $AZUREAPPTENANT
wget -O $BUILD_SOURCESDIRECTORY/_dl/docfx.zip "https://github.com/dotnet/docfx/releases/download/v2.37/docfx.zip"
unzip $BUILD_SOURCESDIRECTORY/_dl/docfx.zip -d
cp -R $BUILD_SOURCESDIRECTORY/$DOCSFOLDER/_site/. $BUILD_SOURCESDIRECTORY/_publish/
az storage blob upload-batch -s $BUILD_SOURCESDIRECTORY/_publish -d \$web --account-name $AZURESTORAGE
Step: 6 Push your code to your GitHub repository
Link to Part-3
For anyone who’s ever been involved in the engineering hiring process, it’s no easy feat particularly in a growing company.…
The challenge Your data is across multiple systems, in multiple data silos making key customer insights for marketing impossible. Majority…
Fill out the form below and we will get back to you within the next working day.
Can’t wait? Call us now at (503) 567-5522
We’d love to hear from you.
14631 SW Milikan Way
Beaverton, OR 97003