Add github pages
This commit is contained in:
parent
dc78fa721a
commit
a3cc14ba92
4 changed files with 40 additions and 150 deletions
36
.github/workflows/gh-pages.yml
vendored
Normal file
36
.github/workflows/gh-pages.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
name: Deploy Website to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build wasm
|
||||
run: |
|
||||
cargo install wasm-pack
|
||||
wasm-pack build --target web sync_lib
|
||||
cp -R pkg/reconcile.js examples/website/
|
||||
cp -R pkg/reconcile_bg.wasm examples/website/
|
||||
|
||||
- name: Copy website files to output
|
||||
run: |
|
||||
mkdir public
|
||||
cp examples/website/* public/
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: actions/gh-pages@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
publish_branch: gh-pages
|
||||
force_orphan: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue