Skip to content

Commit

Permalink
Use actions/deploy-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Jan 28, 2024
1 parent 6720168 commit ae8abd9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1,444 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
build:
strategy:
matrix:
emscripten_version: [3.1.52, latest]
emscripten_version: ['3.1.52', latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -14,7 +14,7 @@ jobs:

- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
ruby-version: '3.3.0'

- name: Setup emsdk
run: |
Expand All @@ -24,22 +24,33 @@ jobs:
./emsdk activate ${{ matrix.emscripten_version }}
./emsdk construct_env
- name: Build ruby
- 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
- name: Build site
run: |
cd ..
npm run build
tar czf docs.tar.gz docs
- name: Archive site
uses: actions/upload-artifact@v4
- if: matrix.platforms.emscripten_version != 'latest'
name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
name: site
path: docs.tar.gz
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
43 changes: 0 additions & 43 deletions docs/index.html

This file was deleted.

729 changes: 0 additions & 729 deletions docs/index.js

This file was deleted.

661 changes: 0 additions & 661 deletions docs/ruby-wasm-emscripten-dist/index.js

This file was deleted.

Binary file removed docs/ruby-wasm-emscripten-dist/ruby.wasm
Binary file not shown.
Binary file removed docs/ruby-wasm-emscripten-dist/ruby_stdlib.data
Binary file not shown.

0 comments on commit ae8abd9

Please sign in to comment.