it's working as an installable CLI on testPypi. added more docs, handled when there's no custom domains, added to gitignore

This commit is contained in:
2023-03-31 19:09:06 +02:00
parent da8bdd1969
commit 55aebb86f6
5 changed files with 77 additions and 28 deletions

View File

@@ -1,4 +1,6 @@
# Publish Sites to Netlify via CLI!
# What Can Publify Do?
## Publish Sites to Netlify via CLI!
```bash
> ls mysite
@@ -12,7 +14,7 @@
the site is published: http://6426ed336771f2380224fb84--scintillating-mochi-760bd3.netlify.app
```
# Publish Sites to Netlify With Custom Domains Too!
## Publish Sites to Netlify With Custom Domains Too!
```bash
> pub --root-dir mysite --custom-domain dude.helpers.fun
@@ -20,12 +22,10 @@ the site is published: http://6426ee6a10e4e43866b46a42--startling-gingersnap-425
the custom domain was set to dude.helpers.fun.
```
# But First, a Bit of Configuration
To do this magic, you have to first
1) Add an entry for `DOMAINS` in the `.env` file, with comma-separated values (no spaces).
1) Create an environment variable `NETLIFY_TOKEN`, obtained [here](https://app.netlify.com/user/applications#personal-access-tokens).
1) Create an environment variable `NETLIFY_DOMAINS`, with comma-separated values (no spaces), if you're planning to use custom domains.
1) Delegate DNS management of all domains listed in `DOMAINS` to Netlify ([link](https://docs.netlify.com/domains-https/netlify-dns/delegate-to-netlify/))
# Environment Variables
- `NETLIFY_TOKEN`
- `DOMAINS` <-- comma-delimited domains you've already set up in Netlify