Merge pull request #10 from sudokey/master #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
override: true | |
- name: Setup rust cache | |
uses: Swatinem/rust-cache@v1 | |
- name: Install wasm-pack | |
run: cargo install wasm-pack | |
- name: Install NodeJS | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
- name: Install dependencies | |
run: npm install | |
- name: Install binaryen | |
run: sudo apt install binaryen | |
- name: "TEMP: wasm-opt 0.11 fix" | |
run: sudo mkdir -p /usr/bin/bin && sudo ln -s /usr/bin/wasm-opt /usr/bin/bin/wasm-opt | |
- name: Build wasm | |
run: npm run wasm | |
- name: Build app | |
run: npm run build | |
- name: Set CNAME | |
run: echo 'ever.bytie.moe' > ./dist/CNAME | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist |