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

Clean repository when all languages are rebuilt #966

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

geographika
Copy link
Member

When docs are built and pushed to https://github.com/MapServer/mapserver.github.io/ old HTML files are never removed.

There are several published pages which have been removed from https://github.com/MapServer/MapServer-documentation/ that are still online. For example:

This pull request adds a step to delete all the files from the https://github.com/MapServer/mapserver.github.io/ repo if a pull request includes [build_translations] in the commit message. This tag is already used to trigger rebuilds of all languages.

We can only remove all files when rebuilding all languages, otherwise when building just en all the language subfolders (ar, fr etc.) would be removed.

I've tested this on my own forks - see https://github.com/geographika/MapServer-documentation/actions
Note the uk and zh_cn folders are removed completely (they haven't been build for several years):

https://github.com/MapServer/mapserver.github.io/tree/master/uk
https://github.com/MapServer/mapserver.github.io/tree/master/zh_cn

The cleaned repository goes from 1.2 GB and 32,141 files to 810 MB and 28,979 files.
You can compare before and after the clean-up by looking at https://github.com/MapServer/mapserver.github.io/ and https://github.com/geographika/mapserver.github.io

The only files not generated by Sphinx README.md and .nojekyll are restored after the repo is cleaned.

@geographika geographika added the backport branch-8-2 (live) To backport a pull request to branch-8-2 label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport branch-8-2 (live) To backport a pull request to branch-8-2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant