Skip to content

Commit bd451d7

Browse files
committed
pages: migrate to Astro build
1 parent d2693e5 commit bd451d7

59 files changed

Lines changed: 7023 additions & 1332 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pages.yml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,39 +44,32 @@ jobs:
4444
with:
4545
soluna_path: "."
4646

47-
- name: Install web build tools
48-
run: |
49-
sudo apt-get update
50-
sudo apt-get install -y lua5.4 zip
51-
52-
- name: Prepare web assets
53-
run: |
54-
lua5.4 script/build_web.lua \
55-
--soluna . \
56-
--site web \
57-
--wasm "${{ steps.build.outputs.SOLUNA_WASM_PATH }}" \
58-
--js "${{ steps.build.outputs.SOLUNA_JS_PATH }}"
59-
if [ -f "${{ steps.build.outputs.SOLUNA_WASM_MAP_PATH }}" ]; then
60-
cp "${{ steps.build.outputs.SOLUNA_WASM_MAP_PATH }}" web/static/runtime/soluna.wasm.map
61-
fi
62-
63-
- name: Copy WASM side module into runtime
64-
run: |
65-
cp "${{ steps.sample.outputs.SAMPLE_WASM_PATH }}" web/static/runtime/sample.wasm
47+
- name: Setup Node
48+
uses: actions/setup-node@v6
49+
with:
50+
node-version: 24
6651

67-
- name: Setup Hugo
68-
uses: peaceiris/actions-hugo@v3
52+
- name: Setup pnpm
53+
uses: pnpm/action-setup@v4
6954
with:
70-
hugo-version: "0.154.5"
55+
version: 10.28.2
56+
57+
- name: Install website dependencies
58+
run: pnpm --dir website install --frozen-lockfile
7159

7260
- name: Build
73-
run: hugo --source web --minify
61+
run: pnpm --dir website run build:pages
62+
env:
63+
SOLUNA_JS_PATH: ${{ steps.build.outputs.SOLUNA_JS_PATH }}
64+
SOLUNA_WASM_PATH: ${{ steps.build.outputs.SOLUNA_WASM_PATH }}
65+
SOLUNA_WASM_MAP_PATH: ${{ steps.build.outputs.SOLUNA_WASM_MAP_PATH }}
66+
SAMPLE_WASM_PATH: ${{ steps.sample.outputs.SAMPLE_WASM_PATH }}
7467

7568
- name: Upload static files as artifact
7669
id: deployment
7770
uses: actions/upload-pages-artifact@v3
7871
with:
79-
path: web/public
72+
path: website/dist
8073

8174
deploy:
8275
name: Deploy to GitHub Pages

.gitignore

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
bin
22
build
3-
web/public
4-
web/data
5-
web/static/runtime
6-
web/static/data
7-
web/content/examples/*.md
8-
!web/content/examples/_index.md
3+
node_modules
4+
.pnpm-store
5+
pnpm-debug.log*
6+
website/node_modules
7+
website/packages/*/node_modules
8+
website/dist
9+
website/.astro
10+
website/public/runtime/

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ A framework you can use to make 2D games in Lua with multithreading, living on W
1414

1515
It is built on top of [sokol](https://github.com/floooh/sokol) and leverages the power of ltask for multithreading.
1616

17-
[![Nightly](/../../actions/workflows/nightly.yml/badge.svg)](/../../actions/workflows/nightyly.yml)
17+
[![Nightly](/../../actions/workflows/nightly.yml/badge.svg)](/../../actions/workflows/nightly.yml)
1818

1919
## Documentation
2020

2121
- [API Reference](./docs)
2222
- [Examples](./test)
2323
- [Wiki](https://github.com/cloudwu/soluna/wiki)
24+
- [Website](./website/README.md)
2425

2526
## Precompiled Binaries
2627

README.zh-CN.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ Sokol + Lua = Soluna
1414

1515
Soluna 可以运行在 Windows、Linux、macOS 和现代浏览器(通过 WebAssembly)上。
1616

17-
[![Nightly](/../../actions/workflows/nightly.yml/badge.svg)](/../../actions/workflows/nightyly.yml)
17+
[![Nightly](/../../actions/workflows/nightly.yml/badge.svg)](/../../actions/workflows/nightly.yml)
1818

1919
## 文档
2020

2121
- [API 参考](./docs)
2222
- [示例](./test)
2323
- [Wiki](https://github.com/cloudwu/soluna/wiki)
24+
- [演示网站说明](./website/README.zh-CN.md)
2425

2526
## 预编译二进制文件
2627

0 commit comments

Comments
 (0)