Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check

GitHub Action

ZEIT Now Deployment

v2.0.0

ZEIT Now Deployment

check

ZEIT Now Deployment

This action make a deployment with github actions instead of ZEIT Now builder

Installation

Copy and paste the following snippet into your .yml file.

              

- name: ZEIT Now Deployment

uses: amondnet/now-deployment@v2.0.0

Learn more about this action in amondnet/now-deployment

Choose a version

ZEIT Now Deployment

ZEIT Now is a cloud platform for static sites and Serverless Functions

This action make a ZEIT Now deployment with github actions.

  • Deploy to ZEIT now.
  • Comment on pull request.
  • Comment on commit.
  • Create Deployment on github.

Result

preview

pull request example

commit

Inputs

Name Required Default Description
zeit-token [x] ZEIT now token.
zeit-team-id [ ] if your deployment is made on team project and github-comment is true. example: team_asdf1234
github-comment [ ] true if you don't want to comment on pull request.
github-token [ ] if you want to comment on pull request.
now-args [ ] This is optional args for now cli. Example: --prod
working-directory [ ] the working directory
now-project-id [x] ❗️Now CLI 17+,The name property in now.json is deprecated (https://zeit.ink/5F)
now-org-id [x] ❗️Now CLI 17+,The name property in now.json is deprecated (https://zeit.ink/5F)

Outputs

preview-url

The url of deployment preview.

Example Usage

now.json

github.enabled: false

When set to false, ZEIT Now for GitHub will not deploy the given project regardless of the GitHub app being installed.

{
  "name": "zeit-now-deployment",
  "version": 2,
  "scope": "amond",
  "public": false,
  "github": {
    "enabled": false
  },
  "builds": [
    { "src": "./public/**", "use": "@now/static" }
  ],
  "routes": [
    { "src": "/(.*)", "dest": "public/$1" }
  ]
}
  • This is a complete .github/workflow/deploy.yml example.
name: deploy website
on: [pull_request]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: amondnet/now-deployment@v2
        with:
          zeit-token: ${{ secrets.ZEIT_TOKEN }} # Required
          github-token: ${{ secrets.GITHUB_TOKEN }} #Optional 
          zeit-team-id: team_XXXXXXXXXXX #Optional 
          now-args: '--prod' #Optional
          now-org-id: 'YOUR_ORG' #Required
          now-project-id: 'YOUR_PROJECT_ID' #Required 
          working-directory: ./sub-directory

Agnular Example

See .github/workflow/example-angular.yml ,