Skip to content

Commit

Permalink
fmt & deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
hitchhooker committed Aug 16, 2024
1 parent 7f9f337 commit 8fb578f
Show file tree
Hide file tree
Showing 11 changed files with 1,953 additions and 254 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/deploy_pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,27 @@ name: Deploy to GitHub Pages

on:
push:
branches: [master] # Set this to your default branch
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

env:
NODE_VERSION: '18'

jobs:
build-and-deploy:
runs-on: ubuntu-latest

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

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Adjust this to match your project's Node.js version

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: actions/setup-node@v4
with:
toolchain: stable
target: wasm32-unknown-unknown

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Build Rust WASM
run: wasm-pack build --target web
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci
Expand All @@ -41,19 +34,18 @@ jobs:

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
with:
#github_token: ${{ secrets.GH_PAT }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist # Adjust this to match your build output directory

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dist # Adjust this to match your build output directory
publish_dir: ./dist
commit_message: ${{ github.event.head_commit.message }}
force_orphan: true

deploy:
needs: build-and-deploy
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
permissions:
pages: write
id-token: write
Expand All @@ -63,4 +55,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
18 changes: 9 additions & 9 deletions www/app.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from "@solidjs/start/config";
import UnoCSS from "unocss/vite";
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { fileURLToPath } from "url";
import { dirname, resolve } from "path";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand All @@ -13,21 +13,21 @@ export default defineConfig({
fs: {
allow: [
// Add the directory containing your WASM file
resolve(__dirname, '../pkg'),
resolve(__dirname, "../pkg"),
// Include the project root and node_modules
__dirname,
resolve(__dirname, 'node_modules')
resolve(__dirname, "node_modules"),
],
},
prerender: {
crawllinks: true
}
crawllinks: true,
},
},
build: {
target: 'esnext',
target: "esnext",
},
optimizeDeps: {
exclude: ['@mapbox/tiny-sdf']
exclude: ["@mapbox/tiny-sdf"],
},
// Add WASM support
worker: {
Expand All @@ -45,5 +45,5 @@ export default defineConfig({
},
],
},
}
},
});
42 changes: 0 additions & 42 deletions www/app.config.timestamp_1723722362802.js

This file was deleted.

6 changes: 2 additions & 4 deletions www/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"jsx": "preserve",
"jsxImportSource": "solid-js",
"paths": {
"~/*": [
"./src/*"
]
"~/*": ["./src/*"]
}
}
}
}
Loading

0 comments on commit 8fb578f

Please sign in to comment.