Skip to content

Commit efdc1df

Browse files
build and deply with github action
1 parent 63f98cf commit efdc1df

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish on Deno Deploy
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
contents: read
13+
14+
steps:
15+
- name: Clone repository
16+
uses: actions/checkout@v2
17+
18+
- name: Setup Deno environment
19+
uses: denoland/setup-deno@v1
20+
with:
21+
deno-version: v1.x
22+
23+
- name: Build site
24+
run: deno task build
25+
26+
- name: Deploy to Deno Deploy
27+
uses: denoland/deployctl@v1
28+
with:
29+
project: project-name
30+
import-map: "./import_map.json"
31+
entrypoint: serve.ts

serve.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Server from "lume/core/server.ts";
2+
3+
const server = new Server({
4+
port: 8000,
5+
root: `${Deno.cwd()}/_site`,
6+
});
7+
8+
server.start();
9+
10+
console.log("Listening on http://localhost:8000");

0 commit comments

Comments
 (0)