The suggested workflow for site2 is to deploy under /codelabs (e.g., move your entire site there including /index.html), then things will just work
The first article you linked does suggest this: [Support Guide] Can I deploy multiple repositories in a single site?
Could you try that out and let me know if it can work for you?