From 568171c048abf36fe952c73ec4ac6033f2892e2b Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Tue, 9 Aug 2022 01:14:02 +0000 Subject: [PATCH] frontend ci --- .woodpecker/frontend.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.woodpecker/frontend.yml b/.woodpecker/frontend.yml index 88b4451..dac764d 100644 --- a/.woodpecker/frontend.yml +++ b/.woodpecker/frontend.yml @@ -15,6 +15,7 @@ pipeline: commands: - cd frontend - npm run build + group: build docker build: image: plugins/docker settings: @@ -47,3 +48,24 @@ pipeline: include: - frontend/* - .woodpecker/frontend.yml + deploy: + image: plugins/ssh + settings: + host: 192.168.3.5 + username: root + key: + from_secret: SSH_KEY + script: + - docker stop game-algorithms || echo No existing deployment + - docker rm game-algorithms || echo No existing deployment + - docker image rm git.koval.net/cyclane/game-algorithms/frontend:latest || echo No existing image + - docker pull git.koval.net/cyclane/game-algorithms/frontend:latest + - docker run --name game-algorithms -p 3000:3000 -d git.koval.net/cyclane/game-algorithms/frontend:latest + when: + branch: main + path: + include: + - frontend/* + - .woodpecker/frontend.yml +depends_on: + - wasm-o-x-rust