CI deploy failing with Private Repo

One of my CI Github Actions is failing. I am using a private repo which does not allow hosting on GitHub Pages.

I was trying to debug why its failing and it seems that it fails after calling this code:

 import ghapi.core,nbdev.config
  ghapi.core.GhApi(owner=nbdev.config.get_config().user, repo=nbdev.config.get_config().repo, token="***").enable_pages(branch='gh-pages')

with the error stack trace as indicated on the screenshot attached.

I wanted to know if there’s any other way to fix this or why its failing before I delete that workflow since I won’t be using it that much

I have also followed the steps outlined here: nbdev - End-to-end walkthrough

1 Like

Thanks for letting us know - I believe @hamelsmu is looking into this one.

1 Like

Thanks @jimmiemunyi for alerting us to this, repeating my answer from another thread here incase someone finds this thread via a search:

It turns out we cannot enable GitHub pages for private repos through GitHub Actions automatically due to security constraints. You will have to enable GitHub pages yourself. I have edited the Actions workflow to provide more helpful error messages, where possible indicating that you have to enable this yourself. If you try to make a change in your docs you should see the new error messages come up.

Please enable GitHub Pages to publish from the root of the gh-pages branch per these instructions - Configuring a publishing source for your GitHub Pages site - GitHub Docs

1 Like