36 lines
846 B
YAML
36 lines
846 B
YAML
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
|