-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.21 KB
/
Copy pathdeploy.yml
File metadata and controls
45 lines (37 loc) · 1.21 KB
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
name: Deploy site
on:
push:
branches: [main]
paths:
- "site/**"
- ".github/workflows/deploy.yml"
workflow_dispatch:
# Requires:
# secret DENO_DEPLOY_TOKEN — Deno Deploy access token
# var DENO_DEPLOY_PROJECT — Deno Deploy project name
# Prefer the Deno Deploy Git integration (console.deno.com); this workflow is
# an explicit alternative. It is skipped unless the project variable is set.
permissions:
contents: read
id-token: write
jobs:
deploy:
if: ${{ vars.DENO_DEPLOY_PROJECT != '' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
with:
deno-version: v2.9.1
- name: Install workspace deps
run: deno install
- name: Build site
run: deno task build
working-directory: site
- name: Deploy to Deno Deploy
uses: denoland/deployctl@35381c73621e1731268f80e51b54718d086f1e64 # v1
with:
project: ${{ vars.DENO_DEPLOY_PROJECT }}
entrypoint: server-entry.js
root: site/_fresh/server
token: ${{ secrets.DENO_DEPLOY_TOKEN }}