Add CI
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-10-10 21:49:08 +02:00
parent c675a57f78
commit 7b9c6e775a
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
5 changed files with 43 additions and 5 deletions

14
.drone.yml Normal file
View file

@ -0,0 +1,14 @@
kind: pipeline
name: default
type: docker
steps:
- name: docker
image: plugins/docker
settings:
registry: git.froth.zone
username: sam
password:
from_secret: password
repo: git.froth.zone/sam/drone-deno-deploy
tags: latest

View file

@ -1 +1,26 @@
# TODO
# Drone Plugin to Deploy to Deno Deploy
[![Build Status](https://ci.git.froth.zone/api/badges/sam/drone-deno-deploy/status.svg)](https://ci.git.froth.zone/sam/drone-deno-deploy)
A [Drone](https://drone.io) and [Woodpecker](https://woodpecker-ci.org/) plugin to deploy a JavaScript/TypeScript application to [Deno Deploy](https://deno.com/deploy).
This is built on top of [deployctl](https://deno.com/deploy/docs/deployctl).
## Example Usage
```yaml
- 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
```

View file

View file

@ -1,3 +0,0 @@
import { serve } from "https://deno.land/std@0.155.0/http/server.ts";
serve((_req: Request) => new Response("Hello World"));

4
run.sh
View file

@ -45,4 +45,6 @@ if [ -n "$PLUGIN_PROD" ] || [ -n "$PLUGIN_PRODUCTION" ]; then
FLAGS="$FLAGS --prod"
fi
deployctl deploy "$FLAGS" "$PLUGIN_ENTRYPOINT"
# This disgusting monstrosity returns where the build was deployed to. Useful for testing and PRs.
deployctl deploy "$FLAGS" "$PLUGIN_ENTRYPOINT" | tee "$(tty)" | awk '{print $2}' | tail -2 | head -1 > url