diff --git a/.woodpecker/test-and-deploy.yaml b/.woodpecker/deploy.yaml similarity index 72% rename from .woodpecker/test-and-deploy.yaml rename to .woodpecker/deploy.yaml index 6dbfc02..90cf57f 100644 --- a/.woodpecker/test-and-deploy.yaml +++ b/.woodpecker/deploy.yaml @@ -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] diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml new file mode 100644 index 0000000..adcc672 --- /dev/null +++ b/.woodpecker/test.yaml @@ -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