mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
350f2f40e9
commit
3699f39043
35
.github/website.yml
vendored
Normal file
35
.github/website.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: website
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
###################################################
|
||||||
|
- uses: actions/setup-node@v3.1.1
|
||||||
|
- name: Retype build
|
||||||
|
run: |
|
||||||
|
cd docs
|
||||||
|
npm install retypeapp --global
|
||||||
|
retype build
|
||||||
|
###################################################
|
||||||
|
- name: Setup emsdk
|
||||||
|
uses: mymindstorm/setup-emsdk@v12
|
||||||
|
with:
|
||||||
|
version: 3.1.25
|
||||||
|
actions-cache-folder: 'emsdk-cache'
|
||||||
|
- name: Compile
|
||||||
|
run: |
|
||||||
|
bash build_web.sh
|
||||||
|
mv web docs/.retype/static
|
||||||
|
###################################################
|
||||||
|
- uses: crazy-max/ghaction-github-pages@v3
|
||||||
|
with:
|
||||||
|
target_branch: gh-pages
|
||||||
|
build_dir: docs/.retype
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
7
build_web.sh
Normal file
7
build_web.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
python3 prebuild.py
|
||||||
|
|
||||||
|
rm -rf web/lib
|
||||||
|
mkdir web/lib
|
||||||
|
|
||||||
|
SRC=$(find src/ -name "*.cpp")
|
||||||
|
em++ $SRC -Iinclude/ -fno-rtti -fexceptions -O3 -sEXPORTED_FUNCTIONS=_pkpy_new_repl,_pkpy_repl_input,_pkpy_new_vm -sEXPORTED_RUNTIME_METHODS=ccall -o web/lib/pocketpy.js
|
Loading…
x
Reference in New Issue
Block a user