diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index fe4f2f8..f1a1b8a 100755 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -36,6 +36,7 @@ jobs: echo -n "提交消息: ${{ github.event.head_commit.message }}">> notify.tpl cat notify.tpl | envsubst | jq -sR . | xargs -0 -I {} curl -H "Content-Type: application/json" -X POST -d '{"type":"text","msg":{} }' https://amass.fun/notify - run: resources/build.sh build + - run: resources/build.sh lvgl - name: Copy app wt resources to server uses: appleboy/scp-action@v0.1.7 with: @@ -46,6 +47,16 @@ jobs: strip_components: 1 source: "resources/*.css,resources/*.xml" target: /root/Server/resources + - name: Copy lvgl to server + uses: appleboy/scp-action@v0.1.7 + with: + host: ${{ vars.YUYUN_SERVER }} + username: ${{ vars.YUYUN_USER }} + password: ${{ secrets.SERVER_ROOT_PASSWORD }} + overwrite: true + strip_components: 2 + source: build/LvglApplication/lvglapp* + target: /root/Server/amass_blog - name: Copy files to server uses: appleboy/scp-action@v0.1.7 with: diff --git a/LvglApplication/lvgl_shell.html b/LvglApplication/lvgl_shell.html index b52e810..942156e 100644 --- a/LvglApplication/lvgl_shell.html +++ b/LvglApplication/lvgl_shell.html @@ -46,7 +46,7 @@ canvas: (function() { return canvas; })(), - arguments: [ String(rect.width), String(rect.height), siteURL.searchParams.get("example") ?? "default" ], + arguments: [String(rect.width * window.devicePixelRatio), String(rect.height * window.devicePixelRatio), siteURL.searchParams.get("example") ?? "default"], onRuntimeInitialized: function () { // const canvas = document.getElementById('canvas'); // const observer = new ResizeObserver(entries => { diff --git a/Server/conf/server.conf b/Server/conf/server.conf index 174b3d2..5bad38c 100644 --- a/Server/conf/server.conf +++ b/Server/conf/server.conf @@ -59,6 +59,12 @@ location = /wt/app.js { proxy_pass http://wt; } +location ~ ^/lvgl/.+$ { + root amass_blog; + index index.html index.htm; + try_files /lvgl/index.html =404; +} + location /freedom { if ($http_upgrade != "websocket") { # WebSocket协商失败时返回404 return 404;