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

support: `keep_files` and multiple docs versions #1006

Open adam-grant-hendry opened 11 months ago

adam-grant-hendry commented 11 months ago

Checklist

Describe your question

I deploy multiple versions of my docs on a gh-pages branch. The docs live in separate subfolders (e.g. dev, stable, 0.1.0, etc.). I want to keep the docs that are already on the gh-pages and override existing files with new ones (e.g. new dev docs or new stable docs are built).

keep_files=true does not allow this. If I try to overwrite the existing dev folder, the files are written to the root and the old dev folder is left in place. Without keep_files=true, the entire branch is cleared every time I deploy and I lose my existing docs.

Relevant links

Public repository: https://github.com/adam-grant-hendry/poetry_plugin_constrain
YAML workflow: .github/workflows/docs.yml

Relevant log output

No response

Additional context.

No response