title: How to deploy mkdocs site on GitHub Pages under *custom directory*
body: <p>The general idea is to have multiple mkdocs documentation sites under a single repository. Like this:</p>
  <pre><code>- index.html # landing page
    - /product1/getting-started/
    - /product2/getting-started/
  </code></pre>
  <p>I use this script <code>.github/workflows/ci.yml</code> to deploy master on push</p>
  <pre><code>name: ci
  on:
    push:
      branches:
        - master
  jobs:
    deploy:
      runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.x
      - run: pip install mkdocs-material
      - run: mkdocs gh-deploy --force --clean --config-file ./mkdocs.yml --site-dir ./product1
  </code></pre>
  <p>And I use these gh-pages settings (for Custom domain):
  <a href="https://i.stack.imgur.com/I9C35.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I9C35.png" alt="enter image description here" /></a></p>
  <p>And the only result I can get by playing around the config is this</p>
  <p><code>www.example.com/getting-started/</code></p>
  <p>instead of
  <code>www.example.com/product1/getting-started/</code></p>