Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zola builds delete public subdirectory every time #2025

Closed
jamesmcm opened this issue Nov 16, 2022 · 1 comment
Closed

Zola builds delete public subdirectory every time #2025

jamesmcm opened this issue Nov 16, 2022 · 1 comment
Labels
done in pr Already done in a PR

Comments

@jamesmcm
Copy link

Hey,

For simple manual deployment to Github pages, I was using the Octopress approach of adding /public to my .gitignore file, and pushing the root git repo to the protected source branch on my Github Pages user repo, and then making the public subdirectory it's own git repo and pushing that to the master branch so it gets served by Github Pages.

The issue is that the current automatic deletion behaviour means that the .git subdirectory in the public subdir (and thus the commit history) of the built public subdir/master branch gets deleted every time.

This isn't super critical since the commit history of the built master branch for deployment isn't so important (unless one needed to roll back without rebuilding locally), but it is a bit annoying (compared to Octopress).

Other than it works nicely though, so it'd be nice if this could be avoided (i.e. rather than deleting the whole subdirectory, just recursively delete non-hidden files?). I appreciate it's a bit of extra complication though (I think the walkdir crate would be the best option).

Thanks, for the great project btw, I switched my blog over last week, copying most of the Octopress theming 🙂

@Keats
Copy link
Collaborator

Keats commented Nov 16, 2022

See #1985 for someone asking the same thing.

@Keats Keats added the done in pr Already done in a PR label Jan 8, 2023
@Keats Keats closed this as completed Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done in pr Already done in a PR
Projects
None yet
Development

No branches or pull requests

2 participants