Refactor WebAssembly deployment and fix build warnings #351
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Deploy" | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| # Default token permissions; the Pages job requests its write permissions explicitly. | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: deploy-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| qtarch: [android_arm64_v8a, android_armv7] | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential ccache ninja-build openjdk-17-jdk | |
| echo "JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/" >> $GITHUB_ENV | |
| # dpkg-query -L openjdk-17-jdk-headless | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Load CI versions | |
| run: cat .github/ci-versions.env >> "$GITHUB_ENV" | |
| - name: Install Qt native version (the one provided by aqt doesn't seem to work) | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: ${{ env.QT_VERSION }} | |
| host: 'linux' | |
| target: 'desktop' | |
| arch: 'linux_gcc_64' | |
| dir: '${{github.workspace}}/qt' | |
| install-deps: 'true' | |
| cache: true | |
| - name: Set QT_HOST_ROOT_DIR | |
| run: echo "QT_HOST_ROOT_DIR=${QT_ROOT_DIR}" >> "$GITHUB_ENV" | |
| - name: Install Qt crosscompile android version | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: ${{ env.QT_VERSION }} | |
| host: linux | |
| target: android | |
| arch: ${{ matrix.qtarch }} | |
| dir: '${{github.workspace}}/qt' | |
| install-deps: 'true' | |
| modules: ${{ env.QT_MODULES }} | |
| cache: true | |
| - name: Make qt cross binaries executable | |
| run: | | |
| chmod u+x ${QT_ROOT_DIR}/bin/* | |
| - name: Set reusable strings | |
| shell: bash | |
| run: | | |
| BUILD_DIR="${{ github.workspace }}/build" | |
| echo "BUILD_DIR=$BUILD_DIR" >> $GITHUB_ENV | |
| echo "INSTALL_DIR=${{ github.workspace }}/install/${{ matrix.qtarch }}" >> $GITHUB_ENV | |
| ANDROID_BUILD_DIR_ARR=( | |
| "$BUILD_DIR/app/android-build-alpineapp" | |
| "$BUILD_DIR/plain_renderer/android-build-plain_renderer" | |
| "$BUILD_DIR/alp_external/radix/unittests/android-build-unittests_radix" | |
| "$BUILD_DIR/unittests/gl_engine/android-build-unittests_gl_engine" | |
| "$BUILD_DIR/unittests/nucleus/android-build-unittests_nucleus" | |
| ) | |
| DEPLOYMENT_SETTINGS_ARR=( | |
| "$BUILD_DIR/app/android-alpineapp-deployment-settings.json" | |
| "$BUILD_DIR/plain_renderer/android-plain_renderer-deployment-settings.json" | |
| "$BUILD_DIR/alp_external/radix/unittests/android-unittests_radix-deployment-settings.json" | |
| "$BUILD_DIR/unittests/gl_engine/android-unittests_gl_engine-deployment-settings.json" | |
| "$BUILD_DIR/unittests/nucleus/android-unittests_nucleus-deployment-settings.json" | |
| ) | |
| echo "ANDROID_BUILD_DIR_ARR=${ANDROID_BUILD_DIR_ARR[*]}" >> $GITHUB_ENV | |
| echo "DEPLOYMENT_SETTINGS_ARR=${DEPLOYMENT_SETTINGS_ARR[*]}" >> $GITHUB_ENV | |
| - name: Set ccache config | |
| shell: bash | |
| run: | | |
| echo "ALP_CACHE_CONFIG=android_${{ matrix.qtarch }}_Release" >> "$GITHUB_ENV" | |
| echo "ALP_CACHE_TOOLCHAIN=android-${{ matrix.qtarch }}-qt-${QT_VERSION}" >> "$GITHUB_ENV" | |
| echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> "$GITHUB_ENV" | |
| echo "CCACHE_BASEDIR=${{ github.workspace }}" >> "$GITHUB_ENV" | |
| echo "CCACHE_COMPRESS=true" >> "$GITHUB_ENV" | |
| echo "CCACHE_COMPILERCHECK=content" >> "$GITHUB_ENV" | |
| echo "CCACHE_MAXSIZE=500M" >> "$GITHUB_ENV" | |
| - name: Cache ccache | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ github.workspace }}/.ccache | |
| key: ccache-${{ runner.os }}-${{ env.ALP_CACHE_CONFIG }}-${{ env.ALP_CACHE_TOOLCHAIN }}-v1-${{ github.run_id }}-${{ github.run_attempt }} | |
| restore-keys: | | |
| ccache-${{ runner.os }}-${{ env.ALP_CACHE_CONFIG }}-${{ env.ALP_CACHE_TOOLCHAIN }}-v1- | |
| - name: Setup signing keys | |
| shell: bash | |
| env: | |
| # So we can detect if a real password was provided | |
| SECRET_TEST: ${{ secrets.KEYSTOREPASSWORD }} | |
| CMAKE_PREFIX_PATH: ${{ env.QT_ROOT_DIR }}/lib/cmake | |
| run: | | |
| # If we have a real KEYSTOREPASSWORD, decode the real keystore | |
| if [ -n "${SECRET_TEST}" ]; then | |
| echo "Using real key from secrets." | |
| echo "${{ secrets.SIGNINGKEYBASE64 }}" > release.keystore.base64 | |
| base64 -d release.keystore.base64 > release.keystore | |
| echo "QT_ANDROID_KEYSTORE_PATH=$(pwd)/release.keystore" >> "$GITHUB_ENV" | |
| echo "QT_ANDROID_KEYSTORE_ALIAS=alpinemaps" >> "$GITHUB_ENV" | |
| echo "QT_ANDROID_KEYSTORE_STORE_PASS=${SECRET_TEST}" >> "$GITHUB_ENV" | |
| echo "QT_ANDROID_KEYSTORE_KEY_PASS=${SECRET_TEST}" >> "$GITHUB_ENV" | |
| else | |
| keytool -genkey -v -keystore release.keystore -alias alpinemaps \ | |
| -keyalg RSA -sigalg SHA1withRSA -keysize 2048 -validity 10000 \ | |
| -keypass asdfasdf -storepass asdfasdf \ | |
| -dname "CN=Franz, OU=IT, O=Furz, L=Rattenberg, ST=Tirol, C=AT" | |
| echo "QT_ANDROID_KEYSTORE_PATH=$(pwd)/release.keystore" >> "$GITHUB_ENV" | |
| echo "QT_ANDROID_KEYSTORE_ALIAS=alpinemaps" >> "$GITHUB_ENV" | |
| echo "QT_ANDROID_KEYSTORE_STORE_PASS=asdfasdf" >> "$GITHUB_ENV" | |
| echo "QT_ANDROID_KEYSTORE_KEY_PASS=asdfasdf" >> "$GITHUB_ENV" | |
| mkdir -p "$INSTALL_DIR" | |
| README_PATH="$INSTALL_DIR/read_me.txt" | |
| echo "The apk was signed with a generated ephemeral debug key which changes every time the apk is generated. This means, that android might refuse to install it if another apk with the same app was installed previously. You'll have to deinstall it. Doing so will delete all settings and cache." >> $README_PATH | |
| echo "" >> $README_PATH | |
| echo "In order to prevent that, you have to generate your own key or use our public key:" >> $README_PATH | |
| echo "" >> $README_PATH | |
| echo "To generate your own key:" >> $README_PATH | |
| echo "- https://stackoverflow.com/questions/3997748/how-can-i-create-a-keystore. Use 'alpinemaps' as the alias!" >> $README_PATH | |
| echo "- If you have the android dev setup ready in Qt Creator, you can also create the keystore via Projects (on the left side toolboar) -> Android Qt ... -> Build -> Build Steps -> Build Android APK -> Application Signature -> Create. Use 'alpinemaps' as the alias!" >> $README_PATH | |
| echo "- Then you have to encode the keystore in base64, e.g., on linux via 'base64 keystorefile > keystorefile.base64'" >> $README_PATH | |
| echo "- Finally, create the following secrets in github -> your repo -> Settings -> Secrets and variables -> Actions -> Repository secrets" >> $README_PATH | |
| echo " SIGNINGKEYBASE64 = the base64 encoded key" >> $README_PATH | |
| echo " KEYSTOREPASSWORD = the password used to create the keystore" >> $README_PATH | |
| echo "" >> $README_PATH | |
| echo "To use our public key, go to https://github.com/AlpineMapsOrg/renderer/blob/main/creating_apk_keys.md" >> $README_PATH | |
| echo "" >> $README_PATH | |
| echo "Oh, and I hope this saved your day :)" >> $README_PATH | |
| fi | |
| - name: Configure | |
| shell: bash | |
| env: | |
| CMAKE_PREFIX_PATH: ${{ env.QT_ROOT_DIR }}/lib/cmake | |
| run: | | |
| # Now run qt-cmake, passing only the non-secret arguments | |
| ${QT_ROOT_DIR}/bin/qt-cmake \ | |
| -G Ninja \ | |
| -B "${BUILD_DIR}" \ | |
| -DQT_HOST_PATH="${QT_HOST_ROOT_DIR}" \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DALP_ENABLE_ASSERTS=ON \ | |
| -DQT_ANDROID_SIGN_APK=ON \ | |
| -DQT_USE_TARGET_ANDROID_BUILD_DIR:BOOL=ON \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -S "${{ github.workspace }}" | |
| - name: Reset ccache stats | |
| run: ccache --zero-stats | |
| - name: Build | |
| run: cmake --build $BUILD_DIR --target apk | |
| - name: Show ccache stats | |
| if: always() | |
| run: ccache --show-stats --verbose | |
| - name: Copy android packages | |
| run: | | |
| mkdir -p "$INSTALL_DIR" | |
| find "$BUILD_DIR" -iname "*.apk" | |
| find "$BUILD_DIR" -type f -iname "*.apk" ! -name "android-build-*.apk" -exec cp {} "$INSTALL_DIR" \; | |
| - name: Create artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: files_${{ matrix.qtarch }} | |
| path: ${{ github.workspace }}/install/ | |
| if-no-files-found: error | |
| build-wasm: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: [wasm_st, wasm_st_debug, wasm_st_lto, wasm_mt, wasm_mt_debug, wasm_mt_lto] | |
| include: | |
| - config: wasm_st | |
| qtflags: '-release -optimize-size -submodules qtdeclarative,qtbase,qtpositioning -skip qtlanguageserver,qtquicktimeline,qtimageformats -gui $(cat $QT_LITE_CONFIG) -no-feature-thread' | |
| cmakeflags: '-DALP_ENABLE_THREADING=OFF -DALP_ENABLE_ASSERTS=OFF' | |
| - config: wasm_st_debug | |
| qtflags: '-release -optimize-size -submodules qtdeclarative,qtbase,qtpositioning -skip qtlanguageserver,qtquicktimeline,qtimageformats -gui -no-feature-thread' | |
| cmakeflags: '-DALP_ENABLE_THREADING=OFF -DALP_ENABLE_ASSERTS=ON' | |
| - config: wasm_st_lto | |
| qtflags: '-release -optimize-size -submodules qtdeclarative,qtbase,qtpositioning -skip qtlanguageserver,qtquicktimeline,qtimageformats -gui -ltcg $(cat $QT_LITE_CONFIG) -no-feature-thread' | |
| cmakeflags: '-DALP_ENABLE_THREADING=OFF -DALP_ENABLE_ASSERTS=OFF -DALP_ENABLE_LTO=ON' | |
| - config: wasm_mt | |
| qtflags: '-release -optimize-size -submodules qtdeclarative,qtbase,qtpositioning -skip qtlanguageserver,qtquicktimeline,qtimageformats -gui $(cat $QT_LITE_CONFIG) -feature-thread' | |
| cmakeflags: '-DALP_ENABLE_THREADING=ON -DALP_ENABLE_ASSERTS=OFF' | |
| - config: wasm_mt_debug | |
| qtflags: '-release -optimize-size -submodules qtdeclarative,qtbase,qtpositioning -skip qtlanguageserver,qtquicktimeline,qtimageformats -gui -feature-thread' | |
| cmakeflags: '-DALP_ENABLE_THREADING=ON -DALP_ENABLE_ASSERTS=ON' | |
| - config: wasm_mt_lto | |
| qtflags: '-release -optimize-size -submodules qtdeclarative,qtbase,qtpositioning -skip qtlanguageserver,qtquicktimeline,qtimageformats -gui -ltcg $(cat $QT_LITE_CONFIG) -feature-thread' | |
| cmakeflags: '-DALP_ENABLE_THREADING=ON -DALP_ENABLE_ASSERTS=OFF -DALP_ENABLE_LTO=ON' | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential ccache ninja-build | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Load CI versions | |
| run: cat .github/ci-versions.env >> "$GITHUB_ENV" | |
| - uses: mymindstorm/setup-emsdk@v15 | |
| with: | |
| version: ${{ env.WEBASSEMBLY_VERSION }} | |
| actions-cache-folder: emsdk-cache | |
| cache-key: emsdk-${{ runner.os }}-${{ env.WEBASSEMBLY_VERSION }} | |
| - name: Use stable Emscripten path | |
| shell: bash | |
| run: | | |
| STABLE_EMSDK_ROOT="${{ github.workspace }}/emsdk-cache/emsdk-main" | |
| if [ ! -x "$STABLE_EMSDK_ROOT/emsdk" ]; then | |
| echo "Expected emsdk at $STABLE_EMSDK_ROOT/emsdk" | |
| exit 1 | |
| fi | |
| "$STABLE_EMSDK_ROOT/emsdk" activate "$WEBASSEMBLY_VERSION" | |
| "$STABLE_EMSDK_ROOT/emsdk" construct_env | while IFS= read -r line; do | |
| case "$line" in | |
| "PATH += "*) | |
| echo "${line#PATH += }" >> "$GITHUB_PATH" | |
| ;; | |
| *" = "*) | |
| name="${line%% = *}" | |
| value="${line#* = }" | |
| echo "$name=$value" >> "$GITHUB_ENV" | |
| ;; | |
| esac | |
| done | |
| # Do not cache Dawn here. It is fetched, not built, and measured CI timings | |
| # showed no useful speedup from restoring/saving the cache. | |
| - name: Install Qt native version (required for cross building) | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: ${{ env.QT_VERSION }} | |
| host: linux | |
| target: 'desktop' | |
| arch: linux_gcc_64 | |
| dir: '${{github.workspace}}/qt_host' | |
| install-deps: 'true' | |
| modules: 'qtshadertools' | |
| cache: true | |
| tools: 'tools_cmake' | |
| - name: Set reusable strings | |
| shell: bash | |
| run: | | |
| echo "BUILD_DIR=$(pwd)/build" >> $GITHUB_ENV | |
| echo "INSTALL_DIR=install/${{ matrix.config}}" >> $GITHUB_ENV | |
| echo "QT_WASM_ROOT_DIR=$(pwd)/qt_wasm_lite" >> $GITHUB_ENV | |
| echo "QT_SRC_CONFIGURE=$(pwd)/qt_src/configure" >> $GITHUB_ENV | |
| echo "QT_LITE_CONFIG=$(pwd)/misc/qt_lite.txt" >> $GITHUB_ENV | |
| - name: Cache Qt WebAssembly build | |
| id: qt-cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: qt_wasm_lite | |
| key: ${{ matrix.config }}_qt-${{ env.QT_VERSION }}_emcc-${{ env.WEBASSEMBLY_VERSION }}_qtpositioning_${{ hashFiles('misc/qt_lite.txt', 'misc/qt_68_qtbase_remove_dejavu_fonts.patch') }} | |
| - name: Download and patch Qt | |
| if: steps.qt-cache.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| git clone --branch $QT_VERSION git://code.qt.io/qt/qt5.git qt_src | |
| mkdir qt_wasm_build | |
| cd qt_wasm_build | |
| $QT_SRC_CONFIGURE -qt-host-path $QT_ROOT_DIR -platform wasm-emscripten -init-submodules -submodules qtdeclarative,qtbase,qtpositioning -skip qtlanguageserver,qtquicktimeline,qtimageformats | |
| cd ${{github.workspace}}/qt_src/qtbase | |
| git apply ${{github.workspace}}/misc/qt_68_qtbase_remove_dejavu_fonts.patch | |
| cd ${{ github.workspace }} | |
| rm -rf qt_wasm_build | |
| mkdir qt_wasm_build | |
| - name: Build Qt for Webassembly (custom version) | |
| if: steps.qt-cache.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| cd qt_wasm_build | |
| ${{env.QT_SRC_CONFIGURE}} -qt-host-path $QT_ROOT_DIR -platform wasm-emscripten ${{ matrix.qtflags }} -prefix "${QT_WASM_ROOT_DIR}/" | |
| # fix broken lto=thin build (https://bugreports.qt.io/browse/QTBUG-129522) | |
| sed -i 's/-flto=thin/-flto/g' ./build.ninja | |
| cmake --build . --parallel && cmake --install . | |
| # Fail if the directory is not created or is empty | |
| [ -d "$QT_WASM_ROOT_DIR" ] && [ "$(ls -A $QT_WASM_ROOT_DIR)" ] || exit 1 | |
| - name: Debug output | |
| if: steps.qt-cache.outputs.cache-hit != 'true' | |
| run: | | |
| emcc -v | |
| echo "cmake version:" | |
| cmake --version | |
| cd ${{ github.workspace }} && ls -l | |
| - name: Remove StatsWindow, otherwise the webassembly will link against qtwidgets and charts. | |
| run: rm ./app/StatsWindow.qml | |
| - name: Set ccache config | |
| shell: bash | |
| run: | | |
| echo "ALP_CACHE_CONFIG=${{ matrix.config }}" >> "$GITHUB_ENV" | |
| echo "ALP_CACHE_TOOLCHAIN=emscripten-${WEBASSEMBLY_VERSION}-qt-${QT_VERSION}" >> "$GITHUB_ENV" | |
| echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> "$GITHUB_ENV" | |
| echo "CCACHE_BASEDIR=${{ github.workspace }}" >> "$GITHUB_ENV" | |
| echo "CCACHE_COMPRESS=true" >> "$GITHUB_ENV" | |
| echo "CCACHE_COMPILERCHECK=content" >> "$GITHUB_ENV" | |
| echo "CCACHE_MAXSIZE=500M" >> "$GITHUB_ENV" | |
| - name: Cache ccache | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ github.workspace }}/.ccache | |
| key: ccache-${{ runner.os }}-${{ env.ALP_CACHE_CONFIG }}-${{ env.ALP_CACHE_TOOLCHAIN }}-v3-${{ github.run_id }}-${{ github.run_attempt }} | |
| restore-keys: | | |
| ccache-${{ runner.os }}-${{ env.ALP_CACHE_CONFIG }}-${{ env.ALP_CACHE_TOOLCHAIN }}-v3- | |
| - name: Configure | |
| env: | |
| CMAKE_PREFIX_PATH: ${{env.Qt6_DIR}}/lib/cmake | |
| run: > | |
| ${QT_WASM_ROOT_DIR}/bin/qt-cmake | |
| -G Ninja | |
| -B $BUILD_DIR | |
| -DCMAKE_BUILD_TYPE=MinSizeRel | |
| -DALP_WWW_INSTALL_DIR=$INSTALL_DIR | |
| -DFMT_INSTALL=OFF | |
| ${{ matrix.cmakeflags }} | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| -S ${{ github.workspace }} | |
| - name: Reset ccache stats | |
| run: ccache --zero-stats | |
| - name: Build | |
| run: cmake --build $BUILD_DIR --target install | |
| - name: Show ccache stats | |
| if: always() | |
| run: ccache --show-stats --verbose | |
| - name: Verify app artifacts | |
| run: | | |
| test -f "$INSTALL_DIR/alpineapp/alpineapp.html" | |
| test -f "$INSTALL_DIR/alpineapp/alpineapp.js" | |
| test -f "$INSTALL_DIR/alpineapp/alpineapp.wasm" | |
| test -f "$INSTALL_DIR/alpineapp/logo_vertical_light_bg.png" | |
| test -f "$INSTALL_DIR/webgpu_app/webgpu_app.html" | |
| test -f "$INSTALL_DIR/webgpu_app/webgpu_app.js" | |
| test -f "$INSTALL_DIR/webgpu_app/webgpu_app.wasm" | |
| - name: Create artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: files_${{ matrix.config}} | |
| path: ${{ github.workspace }}/install/ | |
| if-no-files-found: error | |
| deploy: | |
| if: github.event_name == 'push' | |
| needs: | |
| - build-android | |
| - build-wasm | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y lftp | |
| - name: Clone repository (only for version number) | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| pattern: files_* | |
| path: ${{github.workspace}}/downloaded | |
| - name: Move into place | |
| run: | | |
| mkdir $GITHUB_WORKSPACE/github_page | |
| mv $GITHUB_WORKSPACE/downloaded/*/* $GITHUB_WORKSPACE/github_page/ | |
| - name: Upload to an FTP host | |
| env: | |
| FTP_USER: ${{ secrets.FTP_USER }} | |
| FTP_PASS: ${{ secrets.FTP_PASS }} | |
| FTP_HOST: ${{ secrets.FTP_HOST }} | |
| if: env.FTP_HOST != '' | |
| run: | | |
| reponame=$(echo $GITHUB_REPOSITORY | grep -oE "[^/]*$") | |
| lftp -c " | |
| set ftp:ssl-force true; | |
| open -u $FTP_USER,$FTP_PASS $FTP_HOST; | |
| mirror -R -e -v -n $GITHUB_WORKSPACE/github_page/. ./${reponame}_$(git describe --tags --dirty=-d --abbrev=1); | |
| " | |
| - name: Fix headers for wasm multithread | |
| run: | | |
| for config in wasm_mt wasm_mt_debug wasm_mt_lto; do | |
| cd "$GITHUB_WORKSPACE/github_page/$config" | |
| for target in alpineapp webgpu_app; do | |
| html="$target/$target.html" | |
| test -f "$html" | |
| wget -q -O "$target/coi-serviceworker.min.js" https://raw.githubusercontent.com/gzuidhof/coi-serviceworker/master/coi-serviceworker.min.js | |
| sed -i -e 's#<body onload="init()">#<body onload="init()"><script src="coi-serviceworker\.min\.js"></script>#g' "$html" | |
| done | |
| done | |
| - name: Generate Directory Listings | |
| uses: gacts/directory-listing@v1 | |
| with: | |
| target: github_page | |
| - name: Create Pages artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: ${{github.workspace}}/github_page | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |