mirror of
https://github.com/zhigang1992/now-deployment.git
synced 2026-01-12 22:49:18 +08:00
v1
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
Inputs
zeit-token
required ZEIT now token.
zeit-team-id
optional This is required if your deployment is made on team project and github-comment is true. example: team_asdf1234
github-comment
optional This is required if you don't want to comment on pull request. default: true
github-token
optional This is required if you want to comment on pull request.
now-args
optional This is optional args for now cli. Example: --prod
Outputs
preview-url
The url of deployment preview.
Example Usage
{
"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.ymlexample.
name: deploy website
on: [pull_request]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: amondnet/now-deployment@v1
with:
zeit-token: ${{ secrets.ZEIT_TOKEN }} # Required
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
zeit-team-id: team_XXXXXXXXXXX #Optional
now-args: '--prod' #Optional
specific working-directory
- uses: amondnet/now-deployment@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
zeit-token: ${{ secrets.ZEIT_TOKEN }}
zeit-team-id: team_XXXXXXXXXXX
now-args: '--prod'
working-directory: ./sub-directory
Description
Languages
JavaScript
51.9%
TypeScript
39.5%
HTML
8.2%
CSS
0.4%
