Improving CICD to not deploy on pull_request events 😄
This commit is contained in:
parent
1e79ca1103
commit
b4ef4c8ca6
2 changed files with 18 additions and 1 deletions
|
|
@ -1,6 +1,8 @@
|
|||
when:
|
||||
- event: push
|
||||
branch: main
|
||||
- event: manual
|
||||
branch: main
|
||||
|
||||
steps:
|
||||
- name: test-and-deploy
|
||||
|
|
@ -9,5 +11,9 @@ steps:
|
|||
- /etc/ssh:/etc/ssh
|
||||
commands:
|
||||
- npm ci
|
||||
- npm run test:unit
|
||||
- npm run deploy
|
||||
|
||||
depends_on:
|
||||
- test
|
||||
|
||||
runs_on: [success]
|
||||
11
.woodpecker/test.yaml
Normal file
11
.woodpecker/test.yaml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
when:
|
||||
- event: pull_request
|
||||
- event: manual
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: docker.io/node:hydrogen
|
||||
volumes:
|
||||
commands:
|
||||
- npm ci
|
||||
- npm run test:unit
|
||||
Loading…
Add table
Reference in a new issue