peaceiris / actions-gh-pages

GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.
https://github.com/marketplace/actions/github-pages-action
MIT License
4.65k stars 368 forks source link

proposal: Add an option to allow deploying into the main branch #1079

Open alvinsjoy opened 4 months ago

alvinsjoy commented 4 months ago

Checklist

Describe your proposal

As mentioned in #363, one cannot deploy into the main (or master) branch of the repository as all the contents would be deleted but as you can now deploy to a sub directory, I dont think there is a problem if you are publishing to the main branch itself. Also keep-files option can be used so that the contents on the default branch are not deleted.

Describe the solution you'd like

Allow changing publish_branch to main or master (ie. default branch)

Describe alternatives you've considered

No response

Additional context

This is the current error: image