-
-
Notifications
You must be signed in to change notification settings - Fork 24
65 lines (58 loc) · 1.45 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: deno
on:
push:
branches: [main]
pull_request:
branches: [main]
pull_request_review:
types: [submitted]
branches: [main]
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.42.0
- run: deno fmt --check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.42.0
- run: deno lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.42.0
- run: deno test -A --coverage=cov_profile --no-check
- run: deno coverage cov_profile --lcov --output=lcov.info
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
deploy:
if: github.event_name == 'push' # event push only runs on main
runs-on: ubuntu-latest
needs:
- test
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.42.0
- run: deno run -A db/_ensureIndexes.ts
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
- uses: denoland/deployctl@v1
with:
project: ${{ secrets.DENO_ID }}
entrypoint: src/interactions.ts