GetPublii / Publii

The most intuitive Static Site CMS designed for SEO-optimized and privacy-focused websites.
https://getpublii.com
GNU General Public License v3.0
6.06k stars 407 forks source link

[Feature Request]: Support GitHub repositories with additional code defined e.g GitHub Actions (by specifying a path prefix) #1257

Closed verysamuel closed 8 months ago

verysamuel commented 9 months ago

Current behaviour

Publii is pointed to a branch and it entirely overwrites that branch.

Use case and dsired outcome

I have some workflows defined in a .github folder which I would like to run upon syncing my site. This means that my custom folder needs to not be deleted by the commit from Publii, because if it is deleted, my code doesn't run.

Proposal

Allow the user to specify a path prefix (i.e folder) into which the site will be uploaded. Default to current behaviour. This would solve my problem as the specified subfolder can live along side my other files.

There are alternative solutions such as keeping track of Publii files and ignoring others. I feel solution like that would have a greater potential to introduce problems.

If desired, I can have a look at putting a PR up for this change.

verysamuel commented 9 months ago

I have figured out a workaround which is to put the .github folder in the root-files directory so it will be uploaded with everything else.

This workaround is not exactly ideal because it couples updates to the custom code with updates to the website.

dziudek commented 8 months ago

Hi,

At this moment it is the only simple solution. If it is a critical to you - you can consider using git submodules, and then put your config in one repository which uses other repository with website content as submodule