Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement gh-page workflow on release #1346

Merged
merged 1 commit into from
Jul 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,37 @@ 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
- 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
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down