How to fork when self-hosting?

Hi there, can we use something like that?

What we need to change if that file is OK?

I want to update some strings that I edited manually on my fork of Ghost (I keep the repo merged).

Thanks.

1 Like

That workflow file runs npm pack on a branch, resulting in a .tgz file of the project.

Because JavaScript, HTML and CSS are not compiled there’s not normally a need to run this step on a fork.

Also, ghost install installs .zip files, and this workflow generates a .tgz file. It’s not even clear that it generates something that be installed directly.

If you want to maintain some differences, I recommend you create a file in the “unified diff” file format and save it as a .diff or .patch file.

Then after you run the standard upgrade process, run something like patch <my-patch.diff to patch the code with your differences.

1 Like

Ghost CLI added support for installing from a tgz back in August: Release 1.22.0 · TryGhost/Ghost-CLI · GitHub

2 Likes

OK I don’t really understand how to use Actions but I think I can use old school method:

# Rename origin to upstream again
git remote rename origin upstream

# Add your fork as an origin, editing in <YourUsername>!
git remote add origin git@github.com:<YourUsername>/repo

Is that correct? :slight_smile:

That syntax adds your repo as git’s origin repo, but to understand if that will help you, you need to post the whole solution you are trying.

1 Like

I wonder if can I change the origin and then pull my own repo to keep Ghost forked?

(I understand that I need to mantain my own fork and keep it updated)

Yes, it looks like you’ve got a Github Actions workflow that supports custom branches and you also have a custom branch.

I work with Github Actions a lot at work and it can be a tool that can be complex to work with at times.

Here I described a lower-tech way to maintain a fork that might be a good fit if you have a small number of changes:

1 Like

We need to force-update language on e-mails. There are changes on 9 files but if I get how to fork and keep Ghost updated, I will edit more.

Then I will try to do PRs on main but I don’t have 1/10 level you have folks, sincerelly :slight_smile:

Thanks, I’ll try to get how to engage Github Actions with our fork.