---
title: Sync multiple GitHub folders
slug: archbee-docs/sync-multiple-github-folders
docTags: 
createdAt: 2024-05-31T09:33:54.000Z
---

If you have multiple folders in your repo that you use for your docs, now you can sync them all with Archbee.

:::hint{type="warning"}
Reminder on how to integrate Archbee and GitHub:
:::

In case you need to jog your memory on how to [integrate the two](https://docs.archbee.com/github#jJpEV), here's a full guide on that.

Up until now, you could only use the `.archbee.yaml` file in a single folder and for a single docs project. Now, you can do so with multiple folders.

If Archbee finds a `.archbee.yaml` file in the repository's root or any other folder, we use that to organize the content. It's the same file in all folders where you have docs stored.

Here's an example of how to set up and configure your Git repo so that Archbee can fetch the content in there and set it up nicely into our software > [Archbee git repo](https://github.com/dragosbulugean/slate)

## Set up the repo

Refer to our abovementioned Archbee repo.

If the system finds a `.archbee.yaml` file in the root of the repo like [this one](https://github.com/dragosbulugean/slate/blob/master/.archbee.yaml), then we use that to organize the content. If not, we'll just set some defaults.

### Create .yaml file for multiple folders

Create a `.archbee.yaml` file with the following variable structure.

:::hint{type="info"}
You must place the file in the root folder of your repository(ies). Make sure that the file stays there as this is your default path for all other folders.
:::

- `root: ./docs` property defines where's the directory containing the docs (can be replaced with `docsPath: ./docs`)
- `structure:`
  - `summary: summary.md` reconstructs the document tree in the left navigation panel in Archbee. If there is none, we consider the folders to be the categories and mimic the file structure inside.
  - `assets: assets`    &#x20;the assets folder is relative to docsPath. Archbee will upload all files found from that folder.
- \# This will include all code files from your repo
- `shadowDocs` define the code files/folders to be included as Shadow Docs
- `publishSpace` boolean, set `true` to publish the space to production portal after each commit

![](https://app.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/ARwFXBxpMGGn8Y8Ce1OhI_git-sync-light.png)

Below is an example of an `archbee.yaml` config file with the ***default*** path(folder).

:::CodeblockTabs
.archbee.yaml

```yaml
root: ./docs
structure:
  summary: summary.md
  assets: assets
publishSpace: true
headerIncludes:  |
  <script>
  document.getElementById("demo").innerHTML = "Hello JavaScript!";
  </script> 
```
:::

Example of `archbee.yaml`  config file with ***subpaths***:

```javascript
root: folderx
structure:
  summary: summary.md
  assets: assets
publishSpace: true
headerIncludes:  |
  <script>
  document.getElementById("demo").innerHTML = "Hello JavaScript!";
  </script> 
```

Once you're done, go back to Archbee and check if you're able to select multiple folders in the drop-down menu:

![](https://app.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/KLw-OyxXwYqareQUJNNUC_git-select-light.png "Select GitHub repo")

We also recommend that you create a `summary.md` file. This file reconstructs the document tree in the left navigation panel in Archbee. And it can help you organise your content nicely.

See an example of a `summary.md` file below:

:::CodeblockTabs
summary.md

```markdown
- [Introduction](1.md)

## Table of contents

- [Init](init.md)
- [Configure App](config.md)
- [Config Database](config-database.md)
- [Config Redis](config-redis.md)
- [Config Elastic Search](config-es.md)
- [Swagger](swagger-v2.json)

```
:::

## Sync in Archbee

When you create a new space, select your repo, changes are automatically synced in Archbee.

If that doesn't work automatically, you can force sync by navigating to **Space settings** > **GitHub integration&#x20;**> click the **Sync with repo** button.

![](https://app.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/0yk-oP4X5jVKXKxVdWJlZ_settings-light.png "Sync with repo")
