Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
c675a57f78
commit
7b9c6e775a
5 changed files with 43 additions and 5 deletions
14
.drone.yml
Normal file
14
.drone.yml
Normal 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
|
27
README.md
27
README.md
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
4
run.sh
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue