Skip to content

Use actions/deploy-pages #15

Use actions/deploy-pages

Use actions/deploy-pages #15

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
emscripten_version: ['3.1.52', latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.0'
- name: Setup emsdk
run: |
git clone https://github.com/emscripten-core/emsdk
cd emsdk
./emsdk install ${{ matrix.emscripten_version }}
./emsdk activate ${{ matrix.emscripten_version }}
./emsdk construct_env
- name: Build irb
run: |
source emsdk/emsdk_env.sh
npm install
cd ruby.wasm
./bin/setup
bundle exec rake compile
RUBY_WASM_ADDITIONAL_EXTS=io/console,io/wait RUBY_WASM_EMCC_LDFLAGS="-sASYNCIFY --js-library ${{ github.workspace }}/node_modules/xterm-pty/emscripten-pty.js" bundle exec rake npm:ruby-head-wasm-emscripten:build || find . -name config.log
npm run build
- if: matrix.platforms.emscripten_version != 'latest'
name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs
deploy:
if: github.event_name == 'push'
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: https://mame.github.io/emirb/
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4