Skip to content

Merge pull request #1139 from artichoke/dependabot/bundler/bundler-de… #106

Merge pull request #1139 from artichoke/dependabot/bundler/bundler-de…

Merge pull request #1139 from artichoke/dependabot/bundler/bundler-de… #106

Workflow file for this run

---
name: Publish
"on":
push:
branches:
- trunk
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
name: Build Playground
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
RUST_BACKTRACE: 1
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Set toolchain versions
run: |
echo "emscripten=$(cat emscripten-toolchain)" >> $GITHUB_OUTPUT
id: toolchain_versions
- name: Install Node.js toolchain
uses: actions/[email protected]
with:
node-version: "lts/*"
# Must install deps before setting up emscripten toolchain since emsdk
# includes its own older node which does not support lockfileversion 3
# in package-lock.json.
- name: Install Node.js dependencies
run: npm ci
- name: Install Rust toolchain
uses: artichoke/setup-rust/[email protected]
with:
toolchain: "1.72.1"
target: "wasm32-unknown-emscripten"
- name: Install Ruby toolchain
uses: ruby/setup-ruby@1198b074305f9356bd56dd4b311757cc0dab2f1c # v1.175.1
with:
ruby-version: ".ruby-version"
bundler-cache: true
- name: Install Emscripten toolchain
uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
with:
version: ${{ steps.toolchain_versions.outputs.emscripten }}
no-cache: true
- name: Verify emcc version
run: emcc -v
- name: Compile Wasm
run: ruby scripts/build-wasm.rb --release --verbose
- name: Build Webapp
run: npm run build
# Publish step
- name: Deploy Playground
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v3.9.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: gh-pages
cname: artichoke.run
user_name: artichoke-ci
user_email: [email protected]