Closed tlienart closed 4 years ago
Ok I've now gotten a bit of feedback and done a fair bit of testing on my side with different github accounts, this seems to work fine so I'll push it to the Franklin templates & will release all this soon.
Do these steps work with themes? I followed the project site steps and here is what I see as compared to locally with serve()
https://movvam.github.io/Notepad/
localhost
Any ideas what I've done wrong?
Did you add @def prepath = "Notepad"
in your config.md
? (I'm almost sure that's the issue, basically it's because your root is not movvam.github.io
but actually movvam.github.io/Notepad
to specify this you need to set prepath
in your config.
Edit: I really need to put the content of the post here in the docs & clarify this prepath
thing 🙈
Edit: :+1: for "Big Boi Movva"
Did you add
@def prepath = "Notepad"
in yourconfig.md
?
This fixed it, thanks!
Edit: 👍 for "Big Boi Movva"
😂that's the result of a chrome extension I made that changes "mani" to "big boi" (It's fun until you're printing out an essay and it says Big Boi on the paper)
Instructions now updated thanks to @kescobo see https://franklinjl.org/workflow/deploy/ ; will close this now.
I have tested the steps below but would like to check with others to ensure it works for all. Also if you do it on a test repo, it would be great if you could add me as collaborator so that I can try to trigger an update (without having set up the secrets myself) and check that that works too (sorry I'm still a bit new to this Github actions business).
Thanks a lot!
(cross ref: #379)
Below I assume you already have a local folder that works with Franklin.
Project website
This is for a repo
username/repo
which will lead to the pageusername.github.io/repo/
.1 Generate a key
In your terminal
This will create two files
franklin
andfranklin.pub
.2 Github settings
github.com/username/repo/settings/keys
FRANKLIN
(it doesn't matter)franklin.pub
file created earlier, one way to do so in your terminal:cat franklin.pub
and copy the result without whitespacescat franklin.pub | pbcopy
copies the content directly to your clipboardgithub.com/username/repo/settings/secrets
DEPLOY_KEY
(it does matter)franklin
file created earlier and paste it in the boxYou can now remove the two files created:
3 Deploy action
Edit your
.github/workflows/deploy.yml
file (or create one if you don't have one already) to the following:you can also edit your
.gitignore
and add__site/
to it.Now push all this (on
master
). Your site should appear in a couple of minutes.Personal website
This is for a repo
username/username.github.io
which will lead to the pageusername.github.io/
.The steps (1) and (2) are the same as for the project pages.
(2b) Setting up the branches
For a personal page, your source files must be on a
dev
branch, themaster
branch is only used for deployment. To do this:Clear everything apart from the
.git
folder, either manually or for instance withrm -r !(.git)
and push that cleared branch.Then get back to the
dev
branch and use only that one.3 Deploy action
Edit your
.github/workflows/deploy.yml
file (or create one if you don't have one already) to the following; there are two differences:dev
master
you can also edit your
.gitignore
and add__site/
to it.Now push all this (on
dev
). Your site should appear in a couple of minutes.Finally
It's helpful to change the default branch for the repo on Github by doing: Settings > Branches, pick
dev
and Update.Feedback
Let me know if it works for you, if you think some steps can be simplified / better explained etc.
Thanks!
Edit: notes to self:
lunr
hook is missing, basically it should not beoptimize
the last step but rather something likepublish
(maybe nameddeploy
) without the git operations.node-setup
sinceNodeJS.jl
installs its own version (thanks to Eric Hanson)