Skip to main content

Add a Git Submodule

Use a Git submodule when you want to include an external repository — such as an OCA community module or a private shared library — as part of your Skysize deployment.

Skysize automatically initializes all submodules on every deployment, so once the submodule is in your repository, no manual steps are needed on the platform side beyond setting the addons path.

caution

Skysize only supports public submodule repositories. Private submodule repositories are not supported at this time.


Add a submodule via terminal

In your local clone of your project repository, run:

git submodule add https://github.com/OCA/web.git addons/oca_web
git add .gitmodules addons/oca_web
git commit -m "Add OCA web submodule"
git push

This creates a .gitmodules file and adds the external repository pinned to a specific commit at addons/oca_web.


Add a submodule via the GitHub web interface

If you do not have access to a terminal, you can create the submodule configuration manually:

  1. In your repository on GitHub, click Add file → Create new file.

  2. Name the file .gitmodules.

  3. Add the following content, adjusting the path and URL:

    [submodule "addons/oca_web"]
    path = addons/oca_web
    url = https://github.com/OCA/web.git
  4. Commit the file.

  5. Create the directory placeholder: click Add file → Create new file and name it addons/oca_web/.gitkeep, then commit.

note

The GitHub web interface has limited support for submodules. For anything beyond a single simple submodule, the terminal approach is strongly recommended.


Configure the addons path

Because the submodule is in a subdirectory, you need to tell Skysize where to find the modules:

  1. Go to your project and open the Branches tab.

  2. Click on the branch to open its settings.

  3. In Custom Addons Path, enter the path to the submodule directory:

    /addons/oca_web

    For multiple submodules, separate them with commas:

    /addons/oca_web,/addons/oca_mail
  4. Click Save.

The next deployment will pick up the new path and make the modules available.


Install the module in Odoo

Submodule modules are available on the server but not installed automatically.

  1. Open your Odoo instance.
  2. Enable developer mode: Settings → Activate the developer mode.
  3. Go to Apps, search for your module, and click Install.

Update a submodule to a newer version

To pull in a newer version of the submodule:

cd addons/oca_web
git pull origin main
cd ../..
git add addons/oca_web
git commit -m "Update OCA web submodule"
git push

Skysize will deploy the updated submodule on the next build.