Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaperret committed Jan 24, 2018
1 parent 88e87d2 commit b5162db
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 3 deletions.
117 changes: 117 additions & 0 deletions DOCS.md
Original file line number Diff line number Diff line change
@@ -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)
39 changes: 36 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
# Drone-now
# drone-now

- Create a token here https://zeit.co/account/tokens
- Add the plugin to the pipeline
[![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
```

0 comments on commit b5162db

Please sign in to comment.