Pasting GitHub URLs directly into the Confluence editor works automatically for most GitHub.com URLs but not for custom domains used for GitHub Enterprise for example. In this case, just add the app manually into the Confluence page. See how to include a file.