refactor: nuke a ton of clones #20
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: GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install wasm-pack | |
uses: jetli/[email protected] | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Build lost_playground | |
run: wasm-pack build lost_playground | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'yarn' | |
cache-dependency-path: ./www/yarn.lock | |
- name: Install JS dependencies | |
working-directory: ./www | |
run: yarn install | |
- name: Build website | |
working-directory: ./www | |
run: yarn run build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./www/dist |