Skip to content

Commit

Permalink
Update deno for fe
Browse files Browse the repository at this point in the history
  • Loading branch information
dangvanthanh committed Oct 2, 2023
1 parent d6d62bc commit a88a20f
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 17 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,51 @@
name: Deploy

on:
push:
branches: dangvanthanh/hono
pull_request:
branches: dangvanthanh/hono


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
id-token: write
contents: read

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Cache .deno/
id: cache-deno
uses: actions/cache@v3
with:
path: .deno/
key: ${{ runner.os }}-deno

- name: Cache node_modules/
id: cache-node-modules
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-node-modules

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Build step
run: "moon install && moon run client:build" # 📝 Update the build command(s) if necessary
- name: Build production
env:
DENO_DIR: .deno
run: deno task build

- name: Upload to Deno Deploy
- name: Deploy to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "vue-shopping-cart"
entrypoint: "index.js" # 📝 Update the entrypoint if necessary
root: "." # 📝 Update the root if necessary
project: vue-shopping-cart
root: dist
entrypoint: https://deno.land/std@0.157.0/http/file_server.ts
8 changes: 8 additions & 0 deletions apps/client/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tasks": {
"dev": "deno run -A --unstable --node-modules-dir npm:vite",
"build": "deno run -A --unstable --node-modules-dir npm:vite build",
"preview": "deno run -A --unstable --node-modules-dir npm:vite preview",
"serve": "deno run --allow-net --allow-read main.ts"
}
}
3 changes: 1 addition & 2 deletions apps/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"outDir": "../../.moon/cache/types/apps/client",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@styled-system": ["./styled-system/*"]
"@/*": ["./src/*"]
}
},
"include": [
Expand Down
4 changes: 3 additions & 1 deletion apps/client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import path from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// NOTE(bartlomieju): this is a papercut that shouldn't be required, see README.md
import "npm:vue";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
'@styled-system': path.resolve(__dirname, 'styled-system'),
},
},
})

0 comments on commit a88a20f

Please sign in to comment.