From 7ab443c30cb7c116f768683b95f3226416635082 Mon Sep 17 00:00:00 2001 From: Alessandro Pignotti Date: Mon, 14 Oct 2024 18:59:44 +0200 Subject: [PATCH] CI: Integrate circle for public webvm.io builds --- .circleci/config.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..38b5aba --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,35 @@ +version: 2.1 + +jobs: + deploy: + docker: + - image: cimg/base:2022.10 + resource_class: medium + steps: + - add_ssh_keys: + fingerprints: + - "86:3b:c9:a6:d1:b9:a8:dc:0e:00:db:99:8d:19:c4:3e" + - run: + name: Install NPM + command: | + sudo apt-get update && sudo apt-get install -y npm + - run: + name: Clone WebVM + command: | + git clone --branch $CIRCLE_BRANCH --single-branch git@github.com:leaningtech/webvm.git + - run: + name: Publish NPM packages + command: | + cd webvm/ + npm run build + - run: + name: Deploy webvm + command: | + scp -rP $SSH_PORT webvm/build/* leaningtech@SSH_HOST:/srv/web/webvm_next/ + +workflows: + deploy: + when: + equal: [ << pipeline.trigger_source >>, "api" ] + jobs: + - deploy