Add github pages

This commit is contained in:
Andras Schmelczer 2025-06-15 12:22:45 +01:00
parent dc78fa721a
commit a3cc14ba92
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
4 changed files with 40 additions and 150 deletions

36
.github/workflows/gh-pages.yml vendored Normal file
View 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