DEV Community

Cover image for How to Set up Netlify Deploys for Docfx using GitHub Actions
Sean Killeen
Sean Killeen

Posted on • Originally published at seankilleen.com on

How to Set up Netlify Deploys for Docfx using GitHub Actions

We currently use docfx to publish the NUnit docs, because it has a lovely capability of generating docs for our API reference in addition to all our articles.

However, one thing I often yearn for – that I get on this Jekyll blog and some others I work with – is the ability to have a live preview within a pull request of what the generated site will look like.

Because the source code for the API docs is in the nunit repository, and the docs live in the docs repo, it’ll be a little extra complicated.

Nevertheless: Let’s make it happen.

The Conceptual Approach

  • We pull the NUnit DLL and create the docfx site
  • We zip up the site
  • We create a custom GitHub environment to be associated with our deployment environment
  • We manually update the statuses of that deployment
  • We deploy to Netlify
  • We post the link as a comment in the PR

The Build Steps

Read more at SeanKilleen.com!

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DevOps for Private APIs. With DreamFactory API Generation, you get:

  • Auto-generated live APIs mapped from database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay