Install the Swift toolchain and the WebAssembly SDK as per https://www.swift.org/documentation/articles/wasm-getting-started.html
./build.sh [debug|release]
npx serve Web./build_web_dist.sh
npx serve Web/dist# Check out the branch to deploy. Make sure it is clean.
git checkout main
# Substitute REMOTE_NAME with the actual github remote name.
./deploy_gh_pages.sh REMOTE_NAME
The deploy script will do the following:
- Creates a new local branch
gh-pagesfrom the currently checked out commit - Runs
./build_web_dist.shwhich produces./Web/distas a result - Copies
./Web/distto./docs - Adds and commits
./docsto thegh-pagesbranch - [OPTIONAL] Merges any persistent content on the
gh-pages-staticbranch onto thegh-pagesbranch. - Force pushes the
gh-pagesbranch to the given remote - Deletes the local
gh-pagesbranch
As a result, there will be no version history on GitHub for the gh-pages branch for previously deployed page versions.
In the GitHub repository Settings / Pages page, select Deploy from branch as the source, gh-pages as the branch
and /docs as the directory.