Publish Website to GitHub Pages
To publish your website to GitHub Actions, first, make sure you have
If you don't already have it, create it first.
Use Docusaurus 2 + mdoc + GitHub Actions
Create a Docusarus site directory using its template. You need node for using Docusaurus.
It creates the Docusarus folder at
Check out the Docusuarus docs and finish configuration.
Mdoc + Docusaurus 2
sbt-mdoc plugin and
build.sbt, add a sub-project for the doc site with
sbt-docusaur, and set up the Docusarus.
website/docusaurus.config.js, make sure that Docusaurus knows where your generated Makrdown files are.
So make sure your Docusaurus config has
So it may look like,
Just place the following yaml file in
Whenever push happens on the
master branch, it publishes the website.
It uses Mdoc to generate the Markdown files with the Scala code compiled and run.
After that it builds Docusarus website then publish to