From 40785dd6653e844ba03edaa93b2f69fb0aaed130 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Mon, 14 Oct 2024 19:03:10 +0800 Subject: [PATCH] Add .woodpecker file --- .woodpecker.yml | 18 ++++++++++++++++++ .../gitignore.md | 0 2 files changed, 18 insertions(+) create mode 100644 .woodpecker.yml delete mode 100644 _resources/2 - Initialize your First Project/gitignore.md diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..38e86ee --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,18 @@ +# .woodpecker.yml +steps: + - name: build & copy + image: node:18-alpine + when: + - branch: master + event: push + commands: + - apk add --no-cache openssh-client + - mkdir -p /root/.ssh/ + - echo "$SSH_KEY" | tr -d '\r' > /root/.ssh/id_rsa + - chmod 600 /root/.ssh/id_rsa + - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config + - npm install + - npm run build + - ssh "$REMOTE_HOST" 'rm -rf /mnt/nvme/www/resources/*' + - scp -r dist/* root@10.0.10.4:/mnt/nvme/www/resources + secrets: [SSH_KEY, REMOTE_HOST] diff --git a/_resources/2 - Initialize your First Project/gitignore.md b/_resources/2 - Initialize your First Project/gitignore.md deleted file mode 100644 index e69de29..0000000