Github Pages: Subfolder is not deployed

I searched the documentation and help forum and couldn’t find any information, so I will ask/report here:

It seems like GH Pages have some undocumented behaviours:

  • A folder is named _app will not be deployed.

Here is an example:

They both exist in the repository by only the one in app is deployed.

What is expected:

  • All files to be deployed, since the documentation does not mention special cases
  • Or in case it’s impossible, a documented way to explicitly say what file to excludes/includes

After looking in a random thread in the middle of a plethora of responses proposing basic debugging tips, I found this answer: CSS not being applied in pages :/ which actually describe the behaviour to Jekyll ignoring folders.

It would be good for this behaviour and fix to be documented in the official documentation because it took me hours of finding nothing but finally reading randomly a post to find something related.

Hey @Larandar. This is documented on the Jekyll page here: https://jekyllrb.com/docs/structure/ in this section:

Every file or directory beginning with the following characters: . , _ , # or ~ in the source directory will not be included in the destination folder. Such paths will have to be explicitly specified via the config file in the include directive to make sure they’re copied over

I agree this is a bit buried. If you have any feedback on places you expected this to be documented, I can see about adding it so it’s easier to find next time. Thanks posting a link to an answer that helped!

I guess what induced me in error is the first paragraph of the documentation :

GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website. You can see examples of GitHub Pages sites in the GitHub Pages examples collection.

It says it optionally build them when in fact it’s always built using Jekyll unless you put a .nojekyll file

Ah yeh that is confusing. Technically if you just give us html/css, there’s no build step, but Jekyll is still what determines whether or not to do the build and it will ignore folders with _ prefixes by default, so you have to explicitly tell Jekyll to scan those folders. We’re working on making changes here, but if you’re not using Jekyll I highly recommend looking at some of the GitHub Actions that do the build/deploy for you. These are typically setup to do the .nojekyll bit for you as well as doing a build with your tool of choice. We’ll work on clarifying the docs as well.