From 8e7902aa7f38bb47b950b84a071ed5bfdbd9268e Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Thu, 14 Oct 2021 12:44:51 +0200 Subject: [PATCH] Create CI build script --- .drone.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..c7fa611 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,37 @@ +kind: pipeline +type: docker + +# Check if the game builds +# If yes, test if everything is nice +# If yes, deploy to vercel + +steps: +- name: build-game + image: node + commands: + - yarn build:game +- name: build-pwa + image: node + commands: + - yarn build:pwa +- name: test + image: node + commands: + - yarn test + depends_on: + - build-game + - build-pwa +- name: deploy (production) + image: dockette/vercel + commands: + - vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c + when: + branch: + - main +- name: deploy (preview) + image: dockette/vercel + commands: + - vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c + when: + branch: + - "!main"