ci: integration test

This commit is contained in:
Minsu Lee
2019-10-17 12:46:47 +09:00
parent a03906f9b5
commit 8de5a39113
3 changed files with 55 additions and 0 deletions

40
.github/workflows/deploy.yml vendored Normal file
View 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
View 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" }
]
}