Skip to content

Commit bf2950b

Browse files
authored
Merge pull request #76 from yuchanns/bump-soluna
migrate website
2 parents c7fe203 + 5c77cc1 commit bf2950b

23 files changed

Lines changed: 4433 additions & 852 deletions

.github/assets/index.html

Lines changed: 0 additions & 837 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,41 @@ on:
1111

1212
jobs:
1313
build:
14-
name: Build Runtime
14+
name: Build Website
1515
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master'
1616
runs-on: ubuntu-latest
1717
strategy:
1818
fail-fast: false
1919
steps:
20-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@v6
2121
with:
2222
submodules: recursive
2323
- name: Build Soluna
2424
uses: ./soluna/.github/actions/soluna
2525
id: build
2626
with:
2727
soluna_path: "./soluna"
28-
- name: Prepare Game Content
28+
- name: Setup Node
29+
uses: actions/setup-node@v6
30+
with:
31+
node-version: 24
32+
- name: Build Website
2933
shell: bash
34+
working-directory: website
35+
env:
36+
SITE_BASE: /deepfuture/
37+
SOLUNA_JS_PATH: ${{ steps.build.outputs.SOLUNA_JS_PATH }}
38+
SOLUNA_WASM_PATH: ${{ steps.build.outputs.SOLUNA_WASM_PATH }}
39+
SOLUNA_WASM_MAP_PATH: ${{ steps.build.outputs.SOLUNA_WASM_MAP_PATH }}
3040
run: |
31-
mkdir build
32-
cp "${{ steps.build.outputs.SOLUNA_WASM_PATH }}" ./build/
33-
cp "${{ steps.build.outputs.SOLUNA_JS_PATH }}" ./build/
34-
zip -r ./build/main.zip asset core gameplay localization service visual main.game main.lua
35-
cp .github/assets/index.html ./build/
36-
cp .github/assets/*.ttf ./build/
37-
cp .github/assets/coi-serviceworker.min.js ./build/
41+
corepack enable
42+
pnpm install --no-frozen-lockfile
43+
pnpm run build
3844
- name: Upload static files as artifact
3945
id: deployment
40-
uses: actions/upload-pages-artifact@v3
46+
uses: actions/upload-pages-artifact@v4
4147
with:
42-
path: build/
48+
path: website/dist/
4349
deploy:
4450
name: Deploy to GitHub Pages
4551
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master'
@@ -55,5 +61,3 @@ jobs:
5561
- name: Deploy to GitHub Pages
5662
id: deployment
5763
uses: actions/deploy-pages@v4
58-
59-

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
soluna/
22
.DS_Store
3+
website/node_modules/
4+
website/dist/
5+
website/public/runtime

soluna

Submodule soluna updated 110 files

website/eslint.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default antfu(
4+
{
5+
typescript: true,
6+
stylistic: {
7+
semi: false,
8+
},
9+
},
10+
{
11+
rules: {
12+
'style/semi': ['error', 'never'],
13+
},
14+
},
15+
)

website/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<title>Deep Future</title>
7+
<script src="/coi-serviceworker.min.js"></script>
8+
<script defer src="https://stateflare.yuchanns.xyz/track.js"></script>
9+
</head>
10+
<body>
11+
<div id="app"></div>
12+
<script type="module" src="/src/main.ts"></script>
13+
</body>
14+
</html>

website/package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "deepfuture-website",
3+
"type": "module",
4+
"private": true,
5+
"packageManager": "pnpm@10.33.0",
6+
"scripts": {
7+
"build": "pnpm run prepare:runtime && vite build",
8+
"build:pages": "SITE_BASE=/deepfuture/ pnpm run build",
9+
"dev": "pnpm run prepare:runtime && vite",
10+
"format": "eslint . --fix",
11+
"lint": "eslint .",
12+
"lint:fix": "eslint . --fix",
13+
"prepare:runtime": "node scripts/prepare-runtime.mjs",
14+
"preview": "vite preview"
15+
},
16+
"dependencies": {
17+
"fflate": "^0.8.2"
18+
},
19+
"devDependencies": {
20+
"@antfu/eslint-config": "^7.7.3",
21+
"eslint": "^10.1.0",
22+
"typescript": "^6.0.2",
23+
"vite": "^8.0.3"
24+
}
25+
}

0 commit comments

Comments
 (0)