diff --git a/.woodpecker.yml b/.woodpecker.yml index 79de087..4d4b897 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,5 +1,4 @@ when: - branch: main event: [push, manual] steps: @@ -20,7 +19,7 @@ steps: - cd client && npm run build depends_on: [install] - deploy: + deploy-main: image: alpine:latest environment: DEPLOY_KEY: @@ -30,5 +29,22 @@ steps: - mkdir -p /ssh - 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/ + - rsync -e "ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no" -avz --delete --exclude '*.db' client/dist/ root@192.168.1.88:/var/www/ depends_on: [lint, build] + when: + branch: main + + deploy-dev: + image: alpine:latest + environment: + DEPLOY_KEY: + from_secret: deploy_key + commands: + - apk add --no-cache openssh rsync + - mkdir -p /ssh + - echo "$DEPLOY_KEY" > /ssh/deploy_key + - chmod 600 /ssh/deploy_key + - rsync -e "ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no" -avz --delete --exclude '*.db' client/dist/ root@192.168.1.118:/var/www/ + depends_on: [lint, build] + when: + branch: dev diff --git a/test-dev-trigger.txt b/test-dev-trigger.txt new file mode 100644 index 0000000..add15ed --- /dev/null +++ b/test-dev-trigger.txt @@ -0,0 +1 @@ +trigger-1781703619 diff --git a/test-npm-install.txt b/test-npm-install.txt new file mode 100644 index 0000000..530bfd5 --- /dev/null +++ b/test-npm-install.txt @@ -0,0 +1 @@ +trigger-1781703863