Azure Static Web App
The Azure static web app is a modern web app service that helps with streamlined full-stack development. The feature I like most about it is the ease of CI-CD managed straight from the resource deployment. Refer documentation, Building your first static site in the Azure portal for how to.
First of all, we need a DocFx ready repo, ideally on GitHub. The simplest thing to do is to fork the DocFx seed project.
Once the repo is ready, follow the Microsoft documentation link above to create a new Azure static web app and select this repo from GitHub for Source in Deployment details.
This will create a workflow in the repo. This is super useful as it automatically handles the triggers and required steps. The only step missing will be the building of the DocFx site. This has to be added just before the autogenerated
Build And Deploy step.
- name: Build Documentation uses: nikeee/[email protected] with: args: docs/docfx.json
And that’s it.
This makes it very easy to have a website where you can share your API docs for other teams to refer to. And I remain very impressed with this static web app offering from Azure. You may want to refer the fork I created to test this on github.