If you are on iOS then you can use Working Copy [1] to sync notes through GitHub, GitLab, etc.
To automate the process you can create siri shortcuts like
* Obsidian is opened -> Pull the repository
* Obsidian is closed -> Commit Changes -> Push to the repository