Skip to content

Deploy Emscripten

Deploy Emscripten #121

name: Deploy Emscripten
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.51
- name: Configure CMake
run: emcmake cmake -B ${{ github.workspace }}/build -DSL_BUILD_WAI=OFF -DSL_BUILD_WITH_OPENSSL=OFF -DSL_DOWNLOAD_DATA=OFF -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ${{ github.workspace }}/build --target app-Demo-SLProject -j $(nproc)
- name: Upload
working-directory: ${{ github.workspace }}/build
run: |
sshpass -p "${{ secrets.WEB_DEPLOY_PASSWORD }}" \
sftp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "${{ secrets.EMSCRIPTEN_DEPLOY_REMOTE }}" << EOF \
put app-Demo-SLProject.html public/www/app-Demo-SLProject.html \
put app-Demo-SLProject.js public/www/app-Demo-SLProject.js \
put app-Demo-SLProject.wasm public/www/app-Demo-SLProject.wasm \
put app-Demo-SLProject.worker.js public/www/app-Demo-SLProject.worker.js \
put app-Demo-SLProject.ww.js public/www/app-Demo-SLProject.ww.js \
EOF