From 77db9f85cf0a55897679e5758f4ec36a002c8769 Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Mon, 10 Oct 2022 22:07:19 +0200 Subject: [PATCH] Add drone.yml Signed-off-by: Sam Therapy --- .drone.yml | 49 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 35 ---------------------------- 2 files changed, 49 insertions(+), 35 deletions(-) create mode 100644 .drone.yml delete mode 100644 .github/workflows/ci.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..e4db478 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,49 @@ +kind: pipeline +type: docker +name: example pipeline + +steps: + - name: Build site + image: denoland/deno:alpine + commands: + - deno run -A https://deno.land/x/lume/ci.ts + + - name: Staging + image: git.froth.zone/sam/drone-deno-deploy + environment: + DENO_DEPLOY_TOKEN: + from_secret: DENO_DEPLOY_TOKEN + settings: + project: drone-deploy + entrypoint: server/main.ts + when: + event: + - pull_request + - name: Comment on PR + image: tsakidev/giteacomment:latest + settings: + gitea_token: + from_secret: gitea_token + gitea_base_url: http://git.froth.zone + comment_title: "Deno Deploy URL" + comment_from_file: "./url" + depends_on: + - "Staging" + when: + event: + - pull_request + + - name: Deploy to Deno Deploy (prod) + image: git.froth.zone/sam/drone-deno-deploy + environment: + DENO_DEPLOY_TOKEN: + from_secret: DENO_DEPLOY_TOKEN + settings: + project: drone-deploy + entrypoint: server/main.ts + production: true + when: + branch: + - master + event: + - push \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index bd04cb5..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: ci - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - deploy: - name: deploy - runs-on: ubuntu-latest - permissions: - id-token: write - contents: read - - steps: - - name: Clone repository - uses: actions/checkout@v2 - - - name: Install Deno - uses: denoland/setup-deno@main - with: - deno-version: 1.22.1 - - - name: Build site - run: deno run -A https://deno.land/x/lume/ci.ts - - - name: Deploy to Deno Deploy - uses: denoland/deployctl@v1 - with: - project: lume-example - entrypoint: server/main.ts