GitHub pages doesn't seem to build the site?
-
I've been testing out the Cloudron github pages app, using approximately the test case outlined in the earlier post here:
https://forum.cloudron.io/post/1889
Although correctly pushing the repository inside the site, so
gem install bundler jekyll
jekyll new my-awesome-site
cd my-awesome-site
git init
git add .
git commit -m 'initial commit'
git remote add page https://my.domain/_git/page
git push page master
After the push succeeds, I visit the app's URL, and I see an error:
Error: ENOENT: no such file or directory, stat '/app/data/website/404.html'
Inspecting the contents of
/app/data/website/
, it's not the built version of the site. It looks like a copy of the latestmaster
branch commit, which intentionally has no404.html
, nor anindex.html
file.Shouldn't the app have built the site, and published the result in
/app/data/website/
?At the very least I'd have expected some evidence of a
_site
folder or log entries showing that Jekyll has been run. The logs simply show:Jun 27 12:01:17 => First run, create bare repo Jun 27 12:01:17 Initialized empty Git repository in /app/data/repo.git/ Jun 27 12:01:17 => Install welcome page Jun 27 12:01:17 => Update welcome page Jun 27 12:01:17 => Ensure git hook Jun 27 12:01:17 => Ensure permissions Jun 27 12:01:17 => Run server Jun 27 12:01:17 Listening on port 3000 Jun 27 12:01:17 Using git repo at /app/data/repo.git Jun 27 12:01:17 Serving up directory /app/data/website Jul 05 11:25:59 git: info {} Jul 05 11:26:11 git: info {} Jul 05 12:01:34 git: info {} Jul 05 12:01:40 git: info {} Jul 05 12:01:40 git: push { Jul 05 12:01:40 head: '5c044c8e60311e7bb76c61817d3c3b65eededd46', Jul 05 12:01:40 last: '0095e37ae41807050bb92ead9279c38dfc84151bb247', Jul 05 12:01:40 refname: 'refs/heads/master', Jul 05 12:01:40 ref: 'heads', Jul 05 12:01:40 name: 'master', Jul 05 12:01:40 branch: 'master' Jul 05 12:01:40 } Jul 05 12:01:52 Error: ENOENT: no such file or directory, stat '/app/data/website/404.html'
I was wondering if the build is failing because of Jekyll version differences.
I attempted to match the version exactly. Unfortunately the latest version of Jekyll mentioned in the updates thread (3.8.7) won't install due to errors (Bundler could not find compatible versions for gem "kramdown"), so I used the next version up which will install, 3.9.2. (I note Jekyll has a 4.0 series now).
I'm not sure how crucial that version for the app to work correctly - but I don't see any errors in the logs, so I can only assume it's okay to have a slight difference? If the Github Pages app is very sensitive to version differences in Jekyll, how would I deal with errors such as the one above, due to changes in compatible versions of other gems?
-
@wu-lee said in GitHub pages doesn't seem to build the site?:
Inspecting the contents of /app/data/website/, it's not the built version of the site. It looks like a copy of the latest master branch commit, which intentionally has no 404.html, nor an index.html file.
I got jekyll 4.2.2 installed when I did
gem install jekyll
. And after jekyll new , the site has 404 page.~/tmp/pages/my-awesome-site$ ls -l total 28 -rw-r--r-- 1 girish girish 419 Jul 6 17:19 404.html -rw-r--r-- 1 girish girish 539 Jul 6 17:19 about.markdown -rw-r--r-- 1 girish girish 2080 Jul 6 17:19 _config.yml -rw-rw-r-- 1 girish girish 1304 Jul 6 17:19 Gemfile -rw-rw-r-- 1 girish girish 1899 Jul 6 17:23 Gemfile.lock -rw-r--r-- 1 girish girish 175 Jul 6 17:19 index.markdown drwxrwxr-x 2 girish girish 4096 Jul 6 17:19 _posts
-
Per https://pages.github.com/versions/, the jekyll version needed is 3.9.2. So, I did
sudo gem install jekyll -v 3.9.2
.Then,
jekyll new my-awesome-site
. It has 404.html ...~/tmp/pages/my-awesome-site$ ls -l total 28 -rw-r--r-- 1 girish girish 398 Jul 6 17:29 404.html -rw-r--r-- 1 girish girish 539 Jul 6 17:29 about.md -rw-r--r-- 1 girish girish 1652 Jul 6 17:29 _config.yml -rw-rw-r-- 1 girish girish 1434 Jul 6 17:29 Gemfile -rw-rw-r-- 1 girish girish 1990 Jul 6 17:29 Gemfile.lock -rw-r--r-- 1 girish girish 175 Jul 6 17:29 index.md drwxrwxr-x 2 girish girish 4096 Jul 6 17:29 _posts
Opening the page, I get:
So, I suspect, something went wrong with jekyll project in your setup.
-
@girish Thanks for the sanity check. There does seem to have been something wrong with my jekyll site creation. Trying again, it works as advertised...!? I can see a
remote: => jekyll build
line in the git-push output.IIRC I did attempt this more than once earlier, and I'm not sure what was wrong.
Anyway, hopefully this thread may nevertheless be helpful for someone else getting started on this.