{"id":15472688,"url":"https://github.com/kellymears/site-maintenance-scripts","last_synced_at":"2025-03-03T16:31:15.454Z","repository":{"id":44145258,"uuid":"182576580","full_name":"kellymears/site-maintenance-scripts","owner":"kellymears","description":null,"archived":true,"fork":false,"pushed_at":"2022-12-08T23:37:16.000Z","size":2005,"stargazers_count":7,"open_issues_count":8,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T02:11:13.606Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kellymears.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-21T19:55:52.000Z","updated_at":"2024-12-31T16:36:08.000Z","dependencies_parsed_at":"2023-01-25T18:30:08.685Z","dependency_job_id":null,"html_url":"https://github.com/kellymears/site-maintenance-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellymears%2Fsite-maintenance-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellymears%2Fsite-maintenance-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellymears%2Fsite-maintenance-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellymears%2Fsite-maintenance-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kellymears","download_url":"https://codeload.github.com/kellymears/site-maintenance-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241699045,"owners_count":20005312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T02:40:35.646Z","updated_at":"2025-03-03T16:31:14.620Z","avatar_url":"https://github.com/kellymears.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Site Maintenace Scripts\n\nLightweight Javascript utilities to help you be a better admin. Intended to be hacked on.\n\n## Site Availability Monitor\n\nAutomates checking if your sites are being served correctly. Can take screenshots, check for multiple pages, etc. Defaults to one check per 15 minutes.\n\n## Trellis Sync Scripts Scheduler\n\nAutomate your Trellis syncs.\n\n### Usage\n\n- `example.config.js` must be renamed to `config.js`.\n\n- The function of each configuration parameter is largely self-evident.\n\n- `yarn run script-scheduler` to run scripts\n\n- `yarn run cypress open` will initiate the test suite manually. Runs in an electron window.\n\n### Notes\n\n- This software is in alpha. Please test thoroughly and check your logs frequently.\n- Since this is intended to run headlessly it is necessary to modify Roots' `sync.sh` and remove the user prompt.\n\n### Configuration\n\n#### Top level stuff\n\n| Config option | Purpose                                   |\n| ------------- | ----------------------------------------- |\n| projectsPath  | Absolute path to your sites/code folder   |\n| sshKey        | Absolute path to your SSH key             |\n| logFile       | Specify where you'd like to log to        |\n\n#### Sites\n\n| Config option | Purpose                                   |\n| ------------- | ----------------------------------------- |\n| name          | For humans                                |\n| domain        | TLD. These scripts assume SSH             |\n| scriptPath    | Location of Trellis Sync script           |\n| script        | filename of sync script (it requires modifying the original script) |\n| origin        | Where are you pulling from?               |\n| destination   | Where are you pushing to?                 |\n| schedule      | crontab format schedule for sync job      |\n| local         | `TRUE` if not using VM/container          |\n\n#### Testing\n\n| Config option | Purpose                                   |\n| ------------- | ----------------------------------------- |\n| screenshot    | `TRUE` if you want test scripts to take screenshot of site |\n| routes        | Array of additional URIs to test with cypress. Include `name`, `path` and `screenshot` for each route                              |\n| exceptions       | if you get gnarly feedback from Cypress and wish to ignore the browser error so your test suite passes you can include a part of Chrome's error message string here and Cypress will stop pestering you.             |\n\n#### CronOptions\n\n| Config option | Purpose                                   |\n| ------------- | ----------------------------------------- |\n| scheduled    | leave as `true` most likely  |\n| timezone       | used to schedule tasks            |\n\n\n```js\nmodule.exports = {\n  //Location of your\n  projectsPath: '/users/username/sites/',\n  sshKey: '/users/username/.ssh/do_rsa',\n  logFile: '/users/username/logs/sync-script-process',\n  sites: [\n    {\n      name: 'Example',\n      domain: 'example.org',\n      scriptPath: 'example.org/example.org/scripts/',\n      script: 'scheduled-sync.sh',\n      origin: 'staging',\n      destination: 'development',\n      schedule: '0 2 * * *',\n      local: true,\n    },\n    {\n      name: 'Another Example',\n      domain: 'anotherexample.org',\n      scriptPath: 'anotherexample.org/anotherexample.org/scripts/',\n      script: 'scheduled-sync.sh',\n      origin: 'staging',\n      destination: 'development',\n      schedule: '0 2 * * *',\n      local: true,\n      screenshot: true,\n      testing: {\n        routes: [\n          {\n            name: 'Stories',\n            path: '/stories',\n            screenshot: true,\n          },\n        ],\n        exceptions: [] // place any chrome errors to be ignored here\n      },\n    },\n  ],\n  cronOptions: {\n    scheduled: true,\n    timezone: 'America/Los_Angeles',\n  },\n}\n```\n\n### Contribution guidelines\n\nSure! My own style preferences are in a war right now so NBD; just keep it clean-ish.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkellymears%2Fsite-maintenance-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkellymears%2Fsite-maintenance-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkellymears%2Fsite-maintenance-scripts/lists"}