Receive Slack notification when Google Sites has updated.
This service also supports Service Account, including G Suite domain-wide authority delegation to access private site.
Currently this service only supports Classic Google Sites, since Google Sites Data API does not support rebuilt Google Site.
See also: Google Developers - Google Sites API
Please refer src/config.ts.
There's two kinds of service deployment type.
NOTE
- Currently Serverless deployment only supports AWS Lambda environment.
- Serverless deployment only supports DynamoDB state store.
- Preconfigured sync interval is 5 minutes. you can change this by editing cron expression on serverless.yml
Serverless deployment is preferred since this method does not require additional service management.
$ git clone /~https://github.com/mooyoul/google-sites-slack-notification
$ cd google-sites-slack-notification
$ vi src/config.ts # Setup target Google site and DynamoDB Store
$ npm run dynamodb:migrate
$ npm run deploy:prod
That's it!
$ git clone /~https://github.com/mooyoul/google-sites-slack-notification
$ cd google-sites-slack-notification
$ vi src/config.ts # Setup target Google site and Store (FileStore or DynamoDB)
$ npm start # Execute sync task to test configuration
If sync task was successfully done, add sync task to crontab:
$ crontab -e
and add rule:
0/5 * * * * cd PROJECT_ROOT && flock -xn /tmp/.google-sites-sync.lock -c npm start
See full license on mooyoul.mit-license.org