GitLab Pages with Access Control enabled shows 404 for the page

Summary

Some docs deployed as GitLab Pages with visibility set to "only team members". The page now just shows a basic 404 error, and cannot be viewed.

Steps to reproduce

  • set up a project, deploy Pages with the default CI method,
  • set visibility of pages to "Only Project Members"
  • try to view the page (after it was deployed, and logged in as a project member), result in 404
  • set visibility to Everyone, after a few minutes, the pages can be viewed properly
  • switching back to Only Project Members, after a few minutes it'll be 404 again.

Example Project

Example setup: https://gitlab.com/imrehg/pages-access with pages deployed and visibility set as above

What is the current bug behavior?

When Only Project Members can view a GitLab Page, get 404 error there when logged in as project member

What is the expected correct behavior?

When Only Project Members can view a GitLab Page, can view the page when logged in as project member