Minsu Lee 671b32338b fix: ci
2020-02-18 22:38:23 +09:00
2020-02-18 22:38:23 +09:00
2020-02-18 22:29:54 +09:00
2019-10-17 12:46:47 +09:00
2019-10-16 19:36:33 +09:00
2019-10-17 12:36:15 +09:00
2019-10-17 12:46:47 +09:00
2020-02-18 22:29:54 +09:00
2019-08-26 15:36:41 +02:00
2020-02-18 22:29:54 +09:00

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 ,

Description
No description provided
Readme 47 MiB
Languages
JavaScript 51.9%
TypeScript 39.5%
HTML 8.2%
CSS 0.4%