Script to run on a server to generate anticensority PAC-script.
- GH_REPO — Repo to which generated PAC-script will be uploaded.
- GH_TOKEN — OAuth2 token that gives write access to GH_REPO (scope 'repo').
- First, explicitly select a repo branch "production" (so it appears in the tab address bar).
- In new tab:
- Deploy app > Manage App > Resources tab > Heroku Scheduler > Add new job > input "npm run generate" after $ > Save.
- Deploy tab > Connect to GitHub > connect to production branch with automatic deploys.
- I strongly recommend configuring some error monitoring addon for Heroku. Unfortunately I can't advise any due to lack of long-term experience, you may try Airbrake (requires source modification), Papertail (try "npm ERR" search phrase).