-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.36 KB
/
deno-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
name: Deno Deploy
on:
push:
branches:
- main
paths: ['web/**', '.github/workflows/deno-deploy.yml']
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository
pull-requests: write
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup node and cache
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: web/yarn.lock
- name: Install dependencies
working-directory: ./web
run: yarn
- name: Setup deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Hackfix to build astro
working-directory: ./web
run: deno run -A ./hackfix_astrobuild.ts build
- name: Build Astro
working-directory: ./web
env:
MONGO_URI: ${{secrets.MONGO_URI}}
run: yarn run build
- name: Upload to Deno Deploy
working-directory: ./web
run: |
deno install --allow-all --no-check -r -f https://deno.land/x/deploy/deployctl.ts
cd dist
deployctl deploy --project=${{secrets.DENO_DEPLOY_PROJECT}} --token=${{secrets.DENO_DEPLOY_TOKEN}} --prod ./server/entry.mjs