0.5.0 • Published 6 years ago

@sailci/psx-components-zeit-now v0.5.0

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

ZeitNow

Overview

The ZeitNow component is a simple wrapper around the Zeit now CLI.

Valid Props

NameTypeExampleNotes
tokenstring$ZEIT_TOKENShould be a valid Zeit token
alias?stringdomainYour domain name to alias deployment
paths?string | ?Array\<string>publicPath to folder for deployment

You can also pass any of the many options that you normally would to the Now CLI for deploying and aliasing. For the env option, just like token, any value beginning with $ will be substituted for its value from the current environment variables so you can keep them secret.

Example Usage

Generate a secret using sail secret.

<pipeline>
  <environment>
    <variable secret name="MONGO_URL" value="generated-secret-value" />
    <variable secret name="MY_API_TOKEN" value="generated-secret-value" />
    <variable secret name="ZEIT_TOKEN" value="generated-secret-value" />
  </environment>
  <job image="node:9.2.1-alpine">
    <ZeitNow
      env={{ MONGO_URL: '$MONGO_URL', MY_API_TOKEN: '$MY_API_TOKEN' }}
      paths="./public"
      public
      regions="bru,sfo"
      token="$ZEIT_TOKEN"
      alias="my-domain.now.sh"
    />
  </job>
</pipeline>