Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 25 additions & 30 deletions .github/workflows/deploy-deno.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
name: Deploy to Deno Deploy
name: Deno Deploy

on:
push:
branches:
- main
- master
- development
branches-ignore:
- dist/**
tags-ignore:
- "**"
workflow_dispatch:

permissions:
contents: read
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Cache deps
run: deno task cache

- name: Build static assets
run: deno task build

- name: Deploy to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "ubq-fi"
entrypoint: "serve.ts"
uses: ubiquity/deno-deploy-workflow/.github/workflows/deno-deploy-reusable.yml@main
with:
project: ubq-fi
deploy_platform: deno2
entrypoint: serve.ts
root: .deploy-root
install_command: deno install
build_command: |
deno task build
rm -rf .deploy-root
mkdir -p .deploy-root/static
cp -R static/. .deploy-root/static/
cp serve.ts deno.json .deploy-root/
if [ -f deno.lock ]; then
cp deno.lock .deploy-root/
fi
debug_fetch_fail: true
required_env: |
DENO_DEPLOY_TOKEN
secrets: inherit
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Ubiquity DAO Website (ubq.fi)

- TypeScript + esbuild bundling to `static/dist`
- Deployment: Deno Deploy via GitHub Actions OIDC
- Deployment: Deno 2 Deploy via `ubiquity-os/deno-deploy`
(`.github/workflows/deploy-deno.yml`)
- Local dev: `deno task start` serves `static` at http://localhost:8080

Deploy (CI):

- On push to `main`/`master`, CI builds and deploys using `denoland/deployctl`.
- Project name in Deno Deploy: `ubq-fi`
- On push to non-`dist/**` branches, CI builds and provisions a branch Deno app.
- Default branch app: `ubq-fi.ubiquity-dao.deno.net`
- Entrypoint: `serve.ts` (serves `static/`)

Custom Domain:
Expand Down
1 change: 1 addition & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"@std/http": "jsr:@std/http@^1.0.21",
"esbuild": "npm:esbuild@0.20.1"
},
"nodeModulesDir": "auto",
"tasks": {
"start": "deno run --allow-net --allow-env --allow-run --allow-read --allow-write build/esbuild-server.ts",
"build": "deno run --allow-net --allow-env --allow-run --allow-read --allow-write build/esbuild-build.ts",
Expand Down
Loading