From 7a329f9774d036437d7b8d6db3b33acc03fd19e7 Mon Sep 17 00:00:00 2001 From: Francis Murillo Date: Sat, 19 Jun 2021 22:14:55 +0800 Subject: [PATCH] Implement gh-page workflow on release --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ webpack.config.js | 3 +++ 2 files changed, 38 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96706295174..9ed00b178f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,3 +16,38 @@ jobs: - run: cargo login ${CARGO_REGISTRY_TOKEN} - run: cargo publish working-directory: boa + doc-publish: + needs: publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + with: + ref: master + - uses: actions/checkout@v2.3.4 + with: + ref: gh-pages + path: dist + - name: Install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + - uses: Borales/actions-yarn@v2.3.0 + with: + cmd: install + - name: Cache yarn build + uses: actions/cache@v2.1.6 + with: + path: | + node_modules + target + boa_wasm/pkg + key: ${{ runner.os }}-yarn-build-target-${{ hashFiles('**/yarn.lock') }} + - uses: Borales/actions-yarn@v2.3.0 + with: + cmd: build + - uses: actions/checkout@v2.3.4 + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git add . + git commit -m "Deploy to GitHub pages" + git push + git push --prefix dist origin gh-pages diff --git a/webpack.config.js b/webpack.config.js index 760c21f485d..9be8b74747d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,9 @@ const webpack = require("webpack"); const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin"); module.exports = { + experiments: { + asyncWebAssembly: true, + }, entry: { app: "./index.js", "editor.worker": "monaco-editor/esm/vs/editor/editor.worker.js",