mirror of
https://github.com/zhigang1992/now-deployment.git
synced 2026-01-12 09:14:04 +08:00
ci: integration test
This commit is contained in:
40
.github/workflows/deploy.yml
vendored
Normal file
40
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: deploy website preview
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release/*
|
||||
jobs:
|
||||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
if: "! contains(github.event.head_commit.message, '[ci skip]') && ! contains(github.event.head_commit.message, '[skip ci]')"
|
||||
steps:
|
||||
- run: echo "${{ github.event.head_commit.message }}"
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: create deployment
|
||||
uses: chrnorm/deployment-action@releases/v1
|
||||
id: deployment
|
||||
with:
|
||||
token: ${{ secrets.BOT_TOKEN }}
|
||||
environment: staging
|
||||
|
||||
- uses: ./
|
||||
id: now-deployment
|
||||
with:
|
||||
github-token: ${{ secrets.BOT_TOKEN }}
|
||||
zeit-token: ${{ secrets.ZEIT_TOKEN }}
|
||||
#ZEIT_TEAMID: amond
|
||||
|
||||
- name: set deployment status (failure)
|
||||
uses: chrnorm/deployment-action@releases/v1
|
||||
if: always()
|
||||
with:
|
||||
token: ${{ secrets.BOT_TOKEN }}
|
||||
target-url: ${{ steps.now-deployment.outputs.preview-url }}
|
||||
state: ${{ job.status }}
|
||||
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
|
||||
environment: staging
|
||||
|
||||
15
now.json
Normal file
15
now.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "zeit-now-deployment-action",
|
||||
"version": 2,
|
||||
"scope": "amond",
|
||||
"public": false,
|
||||
"github": {
|
||||
"enabled": false
|
||||
},
|
||||
"builds": [
|
||||
{ "src": "./public/**", "use": "@now/static" }
|
||||
],
|
||||
"routes": [
|
||||
{ "src": "/(.*)", "dest": "public/$1" }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user