Update single file without rebuild. Next.js / Remix / node

Right now I’m building a website in Remix.js and I’m trying to figure out the best way to handle redirects. I have a Wordpress database that I’m converting to headless and I have a ton of redirects, as well as, I create about 2 new redirects per week.

Currently on Build my app gets the data from WP and stores it to a .json file. I then check the url for a match each time a visitor hits the server to redirect.

Do I just create a GitHub action to rebuild the site each time I make a new redirect? Is there a more dynamic way to handle this flow?

Thanks for any help!