Odd behavior with nbdev-cards deployment

I’m having a strange behavior when attempting to deploy a private copy of the nbdev-cards tutorial to github. On the actions page I see the following result:

And when I inspect the log for the failed action it contains the following:

I don’t know how to interpret this.
The local copy of the tutorial folder works fine with nbdev_preview.

Any insight would be appreciated!

1 Like

Hello, this issue has been noted by the developers and is currently being looked at:

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

I see. It is probably due to my just now learning the GitHub pages workflow and didn’t do everything just right on the GitHub side. Thank you!

Nope. Not your fault! We hadn’t tried private repos yet ourselves. Thanks for reporting it

I’m reviewing my side now, as I thought I had created the nbdev-cards repository as public. I was able to successfully complete the getting started tutorial with full completion through deployment to my github pages site. So is it as simple as ensuring that the working repository for the project be created as public?

Here is what my repository on github looks like:

As you can see it is marked as public after the name. Could there be an issue because I used an underscore in the name of the repository instead of a dash?
Thank you!

I see that your error occured at self.create_branch_empty. I’m not sure what would cause that… I don’t think it’s anything to do with your repo name.

@rbagdazian can you please try again and let me know what the error is?

I found my problem. I had inadvertently started working on the “main” branch on my github repository. I branched main to a new “master” branch and re-initialized my local repository to that branch and everything worked correctly. This has always been a bit of a confusion for me. It seems like most of the CI/CD tools like to work off of “master” branch but github defaults to “main” when a new repo is created.


@rbagdazian could you try again with the main branch? This shouldn’t cause an error and I would love to try to troubleshoot this as for some reason I cannot reproduce this (but I can see the error on your repo). I’ve made some tweaks to show an more helpful error message that should help us.

Thanks for your help!

OK, I’ll give it a go. Do I need to upgrade nbdev to get the version with additional diagnostic info?

@hamelsmu I made sure I had the latest version of nbdev installed in my environment, switched to main branch, made a change to the code base. Then executed pip install -e ., and pushed the updated code back to git, and this time it all worked! I’m not exactly sure what I changed but it seems to be working now. Thanks !

Thanks Richard can you try one more time with a new repo as well?

Yes, I’ll do another repo in the next day or so and let you know how it goes.

1 Like

I implemented a new project to perform numeric integration and it seems to be deploying without error, but there’s something not quite right. WHen I use nbdev preview I see the following:

But when I go to the github page there’s no header and sidebar: I see the following:

Am I doing something wrong in my index page?
The github repo is here:

And the github page is here:


If I clone your repo at the gh-pages branch and open index.html, it looks like the expected Quarto documentation. Could it be that GitHub Pages is not correctly configured to deploy from the gh-pages branch? See the docs here: nbdev - End-to-end walkthrough.

By the way, you seem to have a very deeply nested directory starting at _proc. I’m not sure how that happened, but I think it’s safe to delete. You probably also want to add _proc to your .gitignore file. We’ll update nbdev-template to include that automatically moving forward.

1 Like

Thanks @seem I’ll check the gh-pages config. and make the other adjustments you suggested.

1 Like

@seem Thanks for your help. I did have the wrong branch selected in the GitHub pages configuration. I got rid of the wierd _proc folder and added it to .gitignore and everything is working as expected!