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:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
|
branch: main
|
||||||
- event: manual
|
- event: manual
|
||||||
|
branch: main
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test-and-deploy
|
- name: test-and-deploy
|
||||||
|
|
@ -9,5 +11,9 @@ steps:
|
||||||
- /etc/ssh:/etc/ssh
|
- /etc/ssh:/etc/ssh
|
||||||
commands:
|
commands:
|
||||||
- npm ci
|
- npm ci
|
||||||
- npm run test:unit
|
|
||||||
- npm run deploy
|
- 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