Skip to main content

Run to Build and Publish

Docusaur Build

Clean node_modules

docusaurCleanNodeModules

Remove all files in docusaurDir.value / "node_modules"

Install

docusaurInstall

run npm install at docusaurDir.value

Clean the Build directory

docusaurCleanBuild

Remove all files in docusaurBuildDir.value

Build

docusaurBuild

run npm run build at docusaurDir.value

Algolia (Optional)

Generate Algolia Config File

docusaurGenerateAlgoliaConfigFile

Generate the Algolia config file at docusaurDir.value.

Google Analytics (Optional)

Generate Google Analytics Config File

docusaurGenerateGoogleAnalyticsConfigFile

Generate the Google Analytics config file at docusaurDir.value.

Publish

Publish to GitHub Pages

sbt-docusaur uses sbt-github-pages to publish the website to GitHub Pages.

IMPORTANT!

Make sure to run

gitHubPagesCreateGitHubPagesBranchIfNotExist

before any publish task to make sure the gh-pages branch exists. If the gh-pages branch doesn't exist, it will create the gh-pages branch.

The task to publish the website to GitHub Pages is

publishToGitHubPages
info

Please check out this example GitHub Actions to learn how to use it with GitHub Actions.