diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..2a66654 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,57 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ['main'] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Use bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: 1.0.31 + - name: Install WASM binaries from aspectron.org + run: wget -O wasm.zip https://kaspa.aspectron.org/nightly/downloads/kaspa-wasm32-sdk-omega-2024-08-18.zip + - name: Extract WASM binaries + run: | + 7z x wasm.zip + mkdir ./wasm + mv ./kaspa-wasm32-sdk/web/kaspa/* ./wasm + - name: Install Dependencies + run: bun install --production + - name: Build + run: npm run build + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload dist folder + path: './dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index d0d6344..a4309ab 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index ca4d899..7e6fd2c 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,10 @@ { - "name": "kaspian", - "private": true, - "version": "0.0.0", + "name": "kaspian-krc20", + "version": "0.0.1", "type": "module", "scripts": { - "dev": "vite", - "build": "tsc -b && vite build", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "dev": "bunx --bun vite --host", + "build": "bunx --bun vite build --minify false" }, "dependencies": { "@radix-ui/react-dialog": "^1.1.1", @@ -34,13 +31,8 @@ "@types/node": "^22.3.0", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "@typescript-eslint/eslint-plugin": "^7.15.0", - "@typescript-eslint/parser": "^7.15.0", "@vitejs/plugin-react": "^4.3.1", "autoprefixer": "^10.4.20", - "eslint": "^8.57.0", - "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.7", "postcss": "^8.4.41", "tailwindcss": "^3.4.10", "typescript": "^5.2.2", diff --git a/vite.config.ts b/vite.config.ts index 6289621..ff53f59 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,6 +5,7 @@ import path from 'path' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ react() ], + base: "/Kaspian-KRC20/", resolve: { alias: { "@": path.resolve(__dirname, "src")