diff --git a/DOCS.md b/DOCS.md new file mode 100644 index 0000000..59784f0 --- /dev/null +++ b/DOCS.md @@ -0,0 +1,117 @@ +--- +date: 2018-01-24T00:00:00+00:00 +title: Now +author: lucaperret +tags: [ deploy, now ] +repo: lucaperret/drone-now +logo: now.svg +image: lucap/drone-now +--- + +The Now plugin deploy your build to [now.sh](https://zeit.co/now). The below pipeline configuration demonstrates simple usage: + +```yaml +pipeline: + now: + image: lucap/drone-now + token: xxxxx + name: deployment-name +``` + +Example configuration for assigning [Aliases and Domains](https://zeit.co/docs/features/aliases): + +```diff +pipeline: + now: + image: lucap/drone-now + token: xxxxx +- name: deployment-name ++ alias: my-deployment-alias +``` + +Example deploying [Git repositories](https://zeit.co/docs/features/repositories): + +```diff +pipeline: + now: + image: lucap/drone-now + token: xxxxx +- alias: my-deployment-alias ++ git_repository: username/repository +``` + +Example configuration with custom [Path Aliases](https://zeit.co/docs/features/path-aliases): + +```diff +pipeline: + now: + image: lucap/drone-now + token: xxxxx +- git_repository: username/repository ++ rules_domain: example.com ++ rules_file: rules.json +``` + +Example configuration for [Scaling](https://zeit.co/docs/getting-started/scaling): + +```diff +pipeline: + now: + image: lucap/drone-now + token: xxxxx +- rules_domain: example.com +- rules_file: rules.json ++ scale: 2 +``` + +Example configuration to enforce type (by default, it's detected automatically): + +```diff +pipeline: + now: + image: lucap/drone-now + token: xxxxx +- scale: 2 ++ type: npm +``` + +Example configuration using password from secrets: + +```diff +pipeline: + now: + image: lucap/drone-now +- token: xxxxx ++ secrets: [ now_token ] +``` + +# Secret Reference + +now_token +: Now token + +# Parameter Reference + +token +: Now token + +name +: Set the name of the deployment + +alias +: Target Now.sh subdomain or domain + +git_repository +: Git repository of your choice + +rules_domain +: Your domain + +rules_file +: File that contain set of rules + +scale +: Min and Max scaling values + +type +: Deployment type (docker, npm, static) \ No newline at end of file diff --git a/README.md b/README.md index 32b9fe8..8639b95 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,37 @@ -# Drone-now +# drone-now -- Create a token here https://zeit.co/account/tokens -- Add the plugin to the pipeline \ No newline at end of file +[![Docker Pulls](https://img.shields.io/docker/pulls/lucap/drone-now.svg)](https://hub.docker.com/r/lucap/drone-now/) +[![](https://images.microbadger.com/badges/image/lucap/drone-now.svg)](https://microbadger.com/images/lucap/drone-now "Get your own image badge on microbadger.com") +[![Release](https://github-release-version.herokuapp.com/github/lucaperret/drone-now/release.svg?style=flat)](https://github.com/lucaperret/drone-now/releases/latest) + +Deploying to [now.sh](https://zeit.co/now) with [Drone](https://drone.io) CI. For the usage information and a listing of the available options please take a look at [the docs](DOCS.md). + +## Usage + +There are two ways to deploy. + +* [usage from docker](#usage-from-docker) +* [usage from drone CI](#usage-from-drone-ci) + +### Usage from docker + +Deploy the working directory to now. + +```bash +docker run --rm \ + -e NOW_TOKEN=xxxxxxx \ + -e NOW_ALIAS=my-deployment-alias.now.sh \ + -v $(pwd):$(pwd) \ + -w $(pwd) \ + lucap/drone-now +``` + +### Usage from Drone CI + +```yaml +pipeline: + now: + image: lucap/drone-now + token: xxxxx + name: deployment-name +```