From 4072e764f47b890fb05291c5c8328a8d088dc1a2 Mon Sep 17 00:00:00 2001 From: Aditya Thakral Date: Tue, 29 Jun 2021 00:58:43 -0400 Subject: [PATCH 1/2] Add drone.yml --- .drone.yml | 31 +++++++++++++++++++++++++++++++ .gitlab-ci.yml | 49 ------------------------------------------------- 2 files changed, 31 insertions(+), 49 deletions(-) create mode 100644 .drone.yml delete mode 100644 .gitlab-ci.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..64ff29a2 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,31 @@ +--- +kind: pipeline +type: docker +name: node14 + +steps: +- name: install-deps + image: node:14 + commands: + - npm install + +- name: lint + image: node:14 + depends_on: + - install-deps + commands: + - npm run lint + +- name: build + image: node:14 + depends_on: + - install-deps + commands: + - npm run build + +- name: export + image: node:14 + depends_on: + - build + commands: + - npm run export diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 55e2e5a6..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,49 +0,0 @@ -default: - image: node:14 - - cache: - paths: - - node_modules/ - - .next - -stages: - - build - - staging - -variables: - NEXT_PUBLIC_BASE_PATH: '/~a3thakra/csc' - -install_deps: - stage: .pre - script: - - npm install - -lint: - stage: build - script: - - npm run lint - -build: - stage: build - script: - - npm run build - -staging: - stage: staging - script: - - npm run export - artifacts: - paths: - - out - only: - refs: - - main - -deploy_staging: - stage: .post - needs: ["staging"] - script: - - 'curl -XPOST -H "Authorization: Basic $STAGING_SECRET" "https://csclub.uwaterloo.ca/~a3thakra/csc/"' - only: - refs: - - main \ No newline at end of file -- 2.39.2 From c8b349a263de2df36f265fc95003a8aaf735e75c Mon Sep 17 00:00:00 2001 From: Aditya Thakral Date: Tue, 29 Jun 2021 01:56:43 -0400 Subject: [PATCH 2/2] Disable push_request events --- .drone.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.drone.yml b/.drone.yml index 64ff29a2..bca0b8ce 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,3 +29,8 @@ steps: - build commands: - npm run export + +trigger: + event: + exclude: + - pull_request #avoid double build on PRs \ No newline at end of file -- 2.39.2