Franklin deployment problems

I have a locally working Franklin website and have difficulties in deploying it to github. I have tried both with the current documentation and https://github.com/tlienart/Franklin.jl/issues/390

The problem seems to be that deployment doesn’t get triggered, deploy key stays ‘Never used’ and github pages source does not show gh-pages branch.

Yes, I have triple checked the keys, both with deploy key names FRANKLIN_PUB and DEPLOY_KEY.

Which of the deployment setups is currently working?

Julia Version 1.4.0, Franklin v0.6.17

1 Like

Hello!

Sorry about that, did you follow the recently updated instructions here? if you’re using DEPLOY_KEY as a name it would seem that that’s maybe not the case.

Also could you link to your repo so that I can have a look at the workflow? do you use this one ?

Here is also a working project repo you could copy that gathers the instruction: https://github.com/tlienart2/myWebsite

Random other things I can think of:

  • does your deploy key have write access?
  • did you follow the proper instructions for either a project/user website depending on your case?
2 Likes

Many thanks for your quick and friendly reply!

I deleted my previous tests and started from scratch and followed the new instructions: I used FRANKLIN_PRIV and FRANKLIN_PUBas the names of the ḱeys.

Here’s the repo: https://github.com/KajWiik/myWebsite
I used the workflow that was automatically generated (by serve()?). I can test that one also (not in the instructions).

Yes and yes.

Cool ok, note that it works: https://github.com/KajWiik/myWebsite/tree/gh-pages

Can you check in the repo settings that gh-pages is picked up as the page?

A little progress, with this workflow the deployment was triggered. Now the problem is that the site seems to be very barebones without CSS. https://kajwiik.github.io/myWebsite/

could you try merging the two PR I made to your repo (specifically the one with config, the other one is irrelevant) and see if that helps? the issue is a common one when prepath is not set properly (in your case it was though so I just tried to simplify the file)

Done. No change, strange…

now it should work https://kajwiik.github.io/myWebsite/ :+1:

In julia REPL I tried:

julia> verify_links()
All internal links verified ✓.      nline ✗]

julia> publish()
┌ Warning: I couldn't load 'highlight.js' so will not be able to pre-render code blocks. You can install it with `npm install highlight.js`.
└ @ Franklin ~/.julia/packages/Franklin/ptv2u/src/manager/post_processing.jl:169
→ Full pass (with pre-rendering)   [done   9.2s]                                                                                                                                                                                    
→ Minifying *.[html|css] files...  [done 566.8ms]                                                                                                                                                                                    
→ Pushing updates with git...      fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin master

✘ Could not push updates, verify your connection and/or try manually.

e = ProcessFailedException(Base.Process[Process(`git push --quiet`, ProcessExited(128))])

After git push --set-upstream origin master:

julia> publish()
┌ Warning: I couldn't load 'highlight.js' so will not be able to pre-render code blocks. You can install it with `npm install highlight.js`.
└ @ Franklin ~/.julia/packages/Franklin/ptv2u/src/manager/post_processing.jl:169
→ Full pass (with pre-rendering)   [done 126.6ms]                                                                                                                                                                                   
→ Minifying *.[html|css] files...  [done 498.0ms]                                                                                                                                                                                    
→ Pushing updates with git...      [done   4.1s]                                                                                                                                                                                     

And now it seems to almost work, some problems with tables…

$ npm install highlight.js
/home/kjwiik/proj/myWebsite
└── highlight.js@9.18.1 

npm WARN enoent ENOENT: no such file or directory, open '/home/kjwiik/proj/myWebsite/package.json'
npm WARN myWebsite No description
npm WARN myWebsite No repository field.
npm WARN myWebsite No README data
npm WARN myWebsite No license field.

Still publish() does not find highlight.js, strange…

But most of the stuff seems to work, many thanks @tlienart!

Yes, please use NodeJS.jl to install highlight and get Julia to find it without issue, see the docs here

Note: given you use the github action, you do not need to use publish, just push your changes and github action does the rest (including highlight etc).

(I should clarify this in the docs, PRs welcome :slight_smile: )

julia> using NodeJS

julia> run(`sudo $(npm_cmd()) install highlight.js`)
[sudo] password for kjwiik: 
npm WARN saveError ENOENT: no such file or directory, open '/home/kjwiik/proj/myWebsite/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/kjwiik/proj/myWebsite/package.json'
npm WARN myWebsite No description
npm WARN myWebsite No repository field.
npm WARN myWebsite No README data
npm WARN myWebsite No license field.

+ highlight.js@9.18.1
updated 1 package and audited 1 package in 1.1s
found 0 vulnerabilities

Process(`sudo /home/kjwiik/.julia/artifacts/a42f5c72a500a8683c08a5e818d27a104fc9cd5a/bin/node /home/kjwiik/.julia/artifacts/a42f5c72a500a8683c08a5e818d27a104fc9cd5a/bin/npm install highlight.js`, ProcessExited(0))

julia> publish()
┌ Warning: I couldn't load 'highlight.js' so will not be able to pre-render code blocks. You can install it with `npm install highlight.js`.
└ @ Franklin ~/.julia/packages/Franklin/ptv2u/src/manager/post_processing.jl:169
→ Full pass (with pre-rendering)   [done 178.4ms]                                                                                                                                                                                   
→ Minifying *.[html|css] files...  [done 492.9ms]                                                                                                                                                                                    
→ Pushing updates with git...      [done   4.4s]                                                                                                                                                                                     

To me, it seemed that publish() solved the missing CSS problem, of course it could be just timing…

I try to remember to make PR after this has cleared up :slight_smile:

It seems that the table problem is caused by the vela template, in lanyon tables work ok.