Skip to content

Commit

Permalink
Migrate to Deno, Tailwind v4, daisyUI v5 and other improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kuchta committed Jan 18, 2025
1 parent b7d1ad5 commit 3bda882
Show file tree
Hide file tree
Showing 25 changed files with 4,218 additions and 8,749 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/fleek.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy to Fleek

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
deploy:
runs-on: ubuntu-latest
env:
FLEEK_TOKEN: ${{ secrets.FLEEK_TOKEN }}
FLEEK_PROJECT_ID: ${{ secrets.FLEEK_PROJECT_ID }}

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install dependencies
run: deno install

- name: Build
run: deno task build

- name: Install Fleek CLI
run: npm i -g @fleek-platform/cli

- name: Build & deploy sites
run: fleek sites deploy
34 changes: 15 additions & 19 deletions .github/workflows/deploy.yml → .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,43 @@ on:

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
# Deploy to the github-pages environment
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment steps
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
- name: Setup Runtime
uses: denoland/setup-deno@v2
with:
node-version: 20
cache: 'pnpm'
deno-version: v2.x

- name: Install dependencies
run: pnpm install
run: deno install

- name: Build
run: pnpm run build
run: deno task build
env:
BASE_URL: ${{ vars.BASE_URL }}

- name: Create subpages
run: |
mkdir dist/add dist/multiply dist/convert
cp dist/index.html dist/add
cp dist/index.html dist/multiply
cp dist/index.html dist/convert
mkdir dist/add dist/multiply dist/convert
cp dist/index.html dist/add
cp dist/index.html dist/multiply
cp dist/index.html dist/convert
- name: Setup Pages
uses: actions/configure-pages@v3
Expand All @@ -59,5 +55,5 @@ jobs:
path: './dist'

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2
id: deployment
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action
7 changes: 5 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
// "editor.formatOnSave": true,
"editor.formatOnSaveMode": "modificationsIfAvailable",
"[typescript]": { "editor.defaultFormatter": "denoland.vscode-deno" },
"deno.enable": true,
"deno.lint": true,
"typescript.tsdk": "node_modules/typescript/lib",
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///Users/kuchta/Projects/radixverse/.github/workflows/deploy.yml"
},
"editor.formatOnSaveMode": "modificationsIfAvailable",
"typescript.tsserver.experimental.enableProjectDiagnostics": false
}
40 changes: 40 additions & 0 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "@kuchta/radixverse",
"version": "0.0.4",
"exports": "./src/utils.ts",
"nodeModulesDir": "auto",
"tasks": {
"start": "deno run -A npm:vite --host",
"preview": "deno run -A npm:vite preview",
"check": "deno check --unstable-sloppy-imports src/**/*.ts src/**/*.tsx",
"lint": "deno lint",
"test": "deno test --unstable-sloppy-imports",
"build": "deno run -A npm:vite build",
"pre-commit": "deno task lint && deno task test && deno task build"
},
"publish": {
"include": [
"README.md",
"deno.json",
"package.json",
"src/utils.ts"
]
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"lint": {
"include": ["src/"],
"rules": {
"tags": ["recommended"],
"exclude": [
"no-cond-assign"
]
}
},
"compilerOptions": {
"jsx": "react-jsx",
"lib": [ "ESNext", "DOM", "DOM.Iterable" ],
"noFallthroughCasesInSwitch": true,
"strict": true,
"types": [ "node", "vite/client" ]
}
}
Loading

0 comments on commit 3bda882

Please sign in to comment.