try
Some checks reported errors
continuous-integration/drone/push Build encountered an error
ci / build (push) Failing after 13s

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2024-03-27 21:46:48 +01:00
parent c1d62aac00
commit c87abedc4d
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
7 changed files with 43 additions and 76 deletions

View file

@ -3,11 +3,6 @@ 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:
@ -20,21 +15,7 @@ steps:
event:
- pull_request
depends_on:
- "Build site"
# - name: Comment on PR
# image: tsakidev/giteacomment:latest
# settings:
# gitea_token:
# from_secret: gitea_token
# gitea_base_url: https://git.froth.zone
# comment_title: "Deno Deploy URL"
# comment_from_file: "/url"
# depends_on:
# - "Staging"
# when:
# event:
# - pull_request
- "Clone"
- name: Deploy to Deno Deploy (prod)
image: git.froth.zone/sam/drone-deno-deploy
environment:
@ -45,7 +26,7 @@ steps:
entrypoint: server/main.ts
production: true
depends_on:
- "Build site"
- "Clone"
when:
branch:
- master

25
.github/workflows/deploy.yaml vendored Normal file
View file

@ -0,0 +1,25 @@
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy
uses: samtherapy/deno-deploy@master
with:
deno_deploy_token: ${{ secrets.DENO_DEPLOY_TOKEN }}
entrypoint: server/main.ts
project: github-actions-deploy

40
.vscode/launch.json vendored
View file

@ -1,40 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"request": "launch",
"type": "pwa-node",
"program": "https:/deno.land/x/lume@v1.5.1/cli.ts",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "deno",
"runtimeArgs": [
"run",
"--unstable",
"--import-map=.vscode/lume_import_map.json",
"--inspect",
"--allow-all"
],
"attachSimplePort": 9229,
"name": "Lume build"
},
{
"request": "launch",
"type": "pwa-node",
"program": "https:/deno.land/x/lume@v1.5.1/cli.ts",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "deno",
"runtimeArgs": [
"run",
"--unstable",
"--import-map=.vscode/lume_import_map.json",
"--inspect",
"--allow-all"
],
"attachSimplePort": 9229,
"name": "Lume serve",
"args": [
"--serve"
]
}
]
}

View file

@ -1,8 +0,0 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"deno.suggest.imports.hosts": {
"https://deno.land": true
}
}

10
deno.json Normal file
View file

@ -0,0 +1,10 @@
{
"deploy": {
"project": "40dfd057-d475-4171-b26e-03d6649edd5e",
"exclude": [
"**/node_modules"
],
"include": [],
"entrypoint": "server/main.ts"
}
}

View file

@ -1,14 +1,13 @@
---
title: Welcome to my page
---
<html>
<head>
<title>{{ title }}</title>
<title>Welcome to my page</title>
<link rel="stylesheet" href="https://unpkg.com/missing.css@1.1.1">
</head>
<body>
<h1>{{ title }}</h1>
<p>This is an example of a static site generated by <a href="https://lume.land/">Lume</a> on Deno Deploy.</p>
<h1>Welcome to my page</h1>
<p>This is an example of a static site generated on Deno Deploy.</p>
<p>The <a href="/api/time">/api/time</a> endpoint dynamically returns the current time.</p>
<p>You can find the source code for this site <a href="https://git.froth.zone/sam/drone-deploy-example">on my Gitea instance</a>.</p>
</body>

View file

@ -7,7 +7,7 @@ const app = new Application();
app.use(async (ctx, next) => {
try {
await ctx.send({
root: `${Deno.cwd()}/_site`,
root: `${Deno.cwd()}`,
index: "index.html",
});
} catch {