This is the repository for our new free serverless solution, which replaces our old one that would cost about $2 a month to run on a compute engine instance. It uses a combination of App Script and Cloud Functions to retrieve a list of discord tags from our 2023-2024 General Membership Google Form and apply the General Member role to them accordingly.
- Clone this repo
- Install dependencies
npm install --save-exact- Download credentials from GCP service account, place it in the root of the cloned directory and rename it to be
credentials.json - Clone the google app script function using clasp
- all thats needed from this is the
.clasp.jsonfile which is hidden in.gitignorefor security reasons
- all thats needed from this is the
To test the function locally, run the following command after installing all dependencies:
npm run testTo deploy the cloud function, run the following command:
npm run deployTo deploy the app script, run the following command after installing clasp:
clasp pushTo continuously redeploy the app script while making changes, run the following command:
clasp push -wat