This is to show how we can remove all the manual process to clone a Github template repository and deploy into Netlify with a specific subdomain.
npm install
Change the configuration to your settings inside:
src/config.json
Note: DO NOT DEPLOY TO PRODUCTION UNLESS you have changed this code to hide the Personal Access Tokens into environmental variables
Now call, in index.js
, the execute()
with you new repository:
execute(`yourNewRepoName`)
There are many ways to use this, here are a few:
- Slack command:
/create <yourNewRepo>
- Terminal command:
create <yourNewRepo>
- In any other project to save manual work
- ...