---
# System prepended metadata

title: Microsites

---

# Microsites

The purpose of this document is to help you in building and deploying a microsite through GitHub Enterprise Cloud (GHEC).

If you are migrating your site from GitHub Enterprise Server (GHES) to GHEC then click [here](https://cde.optum.com/scm/ghec-migration/) to learn more under the “Starting the Migration Process” section. Otherwise, you will need to have a Docusaurus or MkDocs repository in GHEC to get started.


# Setting Up Your Github Repository



1. Enable GitHub Actions by navigating to Settings > Actions > General > Select “Allow enterprise, and select non-enterprise, actions and reusable workflows” in your github repository. Once you have done this, make sure to hit the save button right below it. You need to have Admin Access in the repository in order to complete this task.
2. You will also need to enable Github Pages by going to Settings > Pages > Under “Build and deployment”, set Source to “GitHub Actions”
3. Create a directory called `.github/workflows`. This should be at the root of your repository.
    1. In the workflows folder, you can add the appropriate starter file for your workflow:
        1. If your site is using MkDocs, include this starter file: mkdocs-microsite.yml
            1. You can specify the python version within this file. It is set to 3.10 by default.
        2. For Docusaurus, include this starter file: docusaurus-microsite.yml
            1. You can change the Node version within this file. It is set to 16.16 by default.
4. If your site is built using docusaurus:
    1. Go to the `docusaurus.config.js` file. In this file, there should be a const variable called config. Make sure to set the baseUrl to `'/'` instead of what’s already in place.
5. If you have a `.forge` folder in your repository, you can remove it.


# Testing that your site is working!



1. When creating or editing a pull-request, the “lint” and “build” jobs should run so that you get a report on your code style and formatting, as well as feedback on whether or not your website will be built.
2. When merging a pull-request into the main branch, it will perform the “lint,” “build,” and “deploy” jobs so that your website will be live.  Once the deploy job succeeds, it will provide you with a URL to your website!


# Setting Up a Vanity URL



1. If you are interested in setting up a vanity url for your website, you can visit [this](https://github.com/optum-eeps/hcc-vanguard-other-github-pages-custom-domain) repository link.
