Skip to content

Commit

Permalink
build page
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkirk committed Jul 16, 2024
1 parent d3c75bb commit c87e28e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer.sh -sSf | sh
- name: Build WebAssembly project
run: wasm-pack build --target web
working-directory: geomedea/geomedea-wasm

- name: Copy web assets
run: |
rm geomedea-wasm/web_root/js/geomedea
&& cp -r geomedea-wasm/pkg geomedea-wasm/web_root/js/geomedea
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: geomedea-wasm/web_root

0 comments on commit c87e28e

Please sign in to comment.