diff --git a/.woodpecker.yml b/.woodpecker.yml index 5a555f3..4096a5d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -6,16 +6,19 @@ steps: image: node:20 commands: - cd client && npm ci + lint: image: node:20 commands: - cd client && npm run lint depends_on: [install] + build: image: node:20 commands: - cd client && npm run build depends_on: [install] + deploy-main: image: alpine:latest environment: @@ -24,12 +27,13 @@ steps: commands: - apk add --no-cache openssh rsync - mkdir -p /ssh - - echo "" > /ssh/deploy_key + - echo "$DEPLOY_KEY" > /ssh/deploy_key - chmod 600 /ssh/deploy_key - rsync -e "ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no" -avz --delete client/dist/ root@192.168.1.88:/var/www/ depends_on: [lint, build] when: branch: main + deploy-dev: image: alpine:latest environment: @@ -38,7 +42,7 @@ steps: commands: - apk add --no-cache openssh rsync - mkdir -p /ssh - - echo "" > /ssh/deploy_key + - echo "$DEPLOY_KEY" > /ssh/deploy_key - chmod 600 /ssh/deploy_key - rsync -e "ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no" -avz --delete client/dist/ root@192.168.1.118:/var/www/ depends_on: [lint, build]