How to prevent file deletions

I can’t find information how i can allow to create file in repository, but not allow to delete. (while using personal token)

In github docs i can see only 2 permissions:
‘read’ - allows to read files
‘create’ - allows to create and… delete

I planned to create chrome extension with automatic data submit… but now i see it’s impossible, because everyone can see API and it’s obvious anyone can delete existing data…

Can someone give ideas?

I need to share public data, that’s why i need to use github as database…

Hello @pastuh and welcome to the community.

It’s true, there isn’t a way to specifically prevent file deletions while allowing file creation or updating within a repository. If you need more granular control over files or data in a database, git may not be the right tool for what you’re designing.

Have you looked at building some sort of web tool on top of AWS or Azure?

I don’t plan to spend money, so need solution which is free…
Both provide free services only for 12 month

It’s not really clear what kind of process you want, but maybe you could work with protected branches to force the data submissions through pull requests? You could even use Actions to automatically check if a pull request deletes files and reject it if so (and possibly even merge automatically if it’s valid).