Gh-pages branch not deployed after students accept assignment

I’ve been using GitHub Classroom for several semesters now. It used to be the case that I could change the master branch to gh-pages in the template so it would deploy a GitHub Page automatically. I was doing this so when students accepted the assignment they would have a page already set up and they wouldn’t need admin rights on their repo to do it themselves.

However, in the last few weeks this has stopped working and I can’t figure out why. When students accept the assignment they get the gh-pages branch copied over but a GitHub Page is never created for it.

I put a support ticket in last week but haven’t heard back from it yet. Any ideas?

FWIW, here is my template repo which is deployed from gh-pages.

And here are the steps I’ve been following to set up each assignment.

I’ve never seen that working the way you described. I always had to give students admin rights to be able to use GH Pages. FWIW, I just explain they have all rights, because its essentially their own repo (shared with the organisation) and thus their own responsibility to handle it with caution. The first few assignments I don’t care if they delete the repo and start over fresh.

I use the github flow (start a new branch, send a PR and select your lecturer as reviewer, don’t merge yourself) for years now, works out great! I’ve built my own monitoring tool with the GitHub API that shows me the progress of their work.

1 Like

I think one reason instructors might not want their students to have admin rights is so that they don’t change their repo from private to public. I guess maybe that’s not relevant, though, if we’re talking about using github pages?


I guess maybe that’s not relevant

Agreed. I only disable admin rights for the final assignment. Because we don’t want students to be able to find other students code online, guessing through :slight_smile:

I was operating under the assumption that limiting admin access would also prevent students from rewriting the repository’s history… But it seems that I’m wrong. That would have been nice in cases of academic integrity violations. I also like to see which students are contributing what parts of a group project so I can assign grades fairly. At least it still prevents the students from removing my access :slight_smile:

You can do that by protecting the branch.

Unfortunately, there’s no way to protect branches automatically from the Classroom dashboard. You would then need to do that manually or in batch through scripts leveraging on GitHub API.

Very cool! Thank you @pattacini!

In case anyone has a similar problem, here is the solution I’m using for now:

During class time, I have time set aside for all the students accept the assignment. Then the TA can go through and manually sets up GHP for each repo in one pass.