Skip to content

ci: split gh-pages from ci jobs #17

ci: split gh-pages from ci jobs

ci: split gh-pages from ci jobs #17

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Add release date to index.html
run: |
VERSION="$(date +'%Y-%m-%d %H:%M')"
sed --in-place "s/<VERSION>/$VERSION/g" index.html
shell: bash
- name: Setup emscripten SDK
uses: mymindstorm/setup-emsdk@v13
- name: Setup Stable Rust with emscripten target
uses: dtolnay/rust-toolchain@v1
with:
target: 'wasm32-unknown-emscripten'
toolchain: 'stable'
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test
- name: Build site
run: ./script/build.sh
- name: Upload arfifact
uses: actions/upload-pages-artifact@v3
if: ${{ github.event_name == 'pull_request' }}
with:
path: 'public/'
retention-days: '1'