- Notifications
You must be signed in to change notification settings - Fork0
A CLI for publishing sites to Netlify and assigning custom subdomains to them.
License
NotificationsYou must be signed in to change notification settings
zevaverbach/publify
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The coolest thingpublify
can do is publish a folder of static web pages and supporting assets to the web using Netlify, including adding a custom subdomain!
Here's the full menu, though, with more details under the headings below:
> pubhelpUsage: pubhelp pub<rootpath> [<custom_domain>] --------------------------------> deploy a site pub list -------------------------------> list all sites pub custom<custom_domain><existing_domain> -------------------------->set a custom domain pub remove-custom<custom_domain> -----------------------> remove a custom domain pub delete/remove<domain or custom_domain> --------------------------------> delete a site
> ls mysite└── folder ├── index.html ├── another_page.html ├── styles.css └── a.jpg>> pub mysite/the site is published: http://6426ed336771f2380224fb84--scintillating-mochi-760bd3.netlify.app
> pub mysite dude.helpers.funthe site is published: http://6426ee6a10e4e43866b46a42--startling-gingersnap-425138.netlify.appthe site is published at dude.helpers.fun.
If you only have one domain set up with Netlify, there's no need to include anything but the subdomain part:
> pub mysite/ dudettethe site is published: http://642718842cb34f02bc6b0137--cheery-daifuku-f3417f.netlify.appthe site is published at dudette.helpers.fun.
> pub listsites without custom domains:cheery-daifuku-f3417f: https://cheery-daifuku-f3417f.netlify.apppreeminent-salamander-6262a7: http://preeminent-salamander-6262a7.netlify.appscintillating-mochi-760bd3: https://scintillating-mochi-760bd3.netlify.apptranscribely: https://transcribely.netlify.appsites with custom domains:euphonious-torrone-029b78: https://shucks.helpers.funflourishing-sherbet-8f356e: https://dudettes.helpers.funbeautiful-meerkat-95c24f: https://duasdfdes.helpers.funglittery-khapse-b51104: https://dudes.helpers.funvelvety-cobbler-d4e023: https://mama.helpers.funplayful-treacle-6fea54: https://okay.helpers.funcalm-dodol-b7aea3: https://thedonkey.helpers.fun
> pub custom hey.helpers.fun preeminent-salamander-6262a7.netlify.appthe site is published at hey.helpers.fun. (originally'preeminent-salamander-6262a7.netlify.app')
You can also provide partial names for the Netlify URLs, and also for the custom domains if you only have one domain listed inNETLIFY_DOMAINS
:
> pub custom hey preeminentthe site is published at hey.helpers.fun. (originally'preeminent-salamander-6262a7.netlify.app')
> pub remove-custom hey'hey.helpers.fun' was removed
Powerful stuff:
> pub delete preeminentsite'http://preeminent-salamander-6262a7.netlify.app' was deleted
To do this magic, you have to first
- Create an environment variable
NETLIFY_TOKEN
, obtainedhere. - Create an environment variable
NETLIFY_DOMAINS
, with comma-separated values (no spaces), if you're planning to use custom domains. - Delegate DNS management of all domains listed in
DOMAINS
to Netlify (link)
- add some color and spinners to the CLI using Rich