Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,11 @@ jobs:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: scripts/send_to_bot.sh dist.tar.gz "Development build"
- name: Reset docs/dev and copy dist
run: |
rm -rf docs/dev
mkdir -p docs/dev
cp -r dist/* docs/dev/
- name: Commit dist
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add -f dist docs
git commit -m "Update dist" || echo "No changes"
git push
- name: Deploy dev build to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: dist
destination_dir: dev

22 changes: 10 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,14 @@ jobs:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: scripts/send_to_bot.sh dist.tar.gz "Release build"
- name: Copy dist to docs
- name: Copy assets
run: |
cp -r dist/* docs/
rm -rf docs/res
mkdir -p docs/res
cp -r res/* docs/res/
- name: Commit release build
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add docs
git commit -m "Update release build" || echo "No changes"
git push origin HEAD:refs/heads/main
rm -rf dist/res
mkdir -p dist/res
cp -r res/* dist/res/
- name: Deploy release to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: dist
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ehthumbs.db
/dist
/dist-local
/public
/docs/dev
/docs

# Test and benchmark results
criterion/
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ The chart supports zoom levels from roughly `0.2x` up to `32x` with a minimum of

## Demo

The development version is available at <https://qqrm.github.io/webgpu-candles/dev/>. Release builds are
published at <https://qqrm.github.io/webgpu-candles/>. The files are
stored in the [`docs/`](docs/) directory.
The development version is available at <https://qqrm.github.io/webgpu-candles/dev/>, and release builds
are published at <https://qqrm.github.io/webgpu-candles/>. GitHub Pages publishes these files from the
`gh-pages` branch, keeping build artifacts out of `main`.

The project requires the `wasm32-unknown-unknown` target, which the build script verifies is installed. Install it with:
`rustup target add wasm32-unknown-unknown`.
Expand Down Expand Up @@ -43,13 +43,12 @@ trunk build --dist dist-local
```

Local builds are saved to `dist-local`. In GitHub Actions the `dist` path is
used and the files are copied to [`docs/`](docs/) to publish the demo.
The `dist/` directory is not stored in the repository, only the contents of
`docs/` are committed. The `docs/version` file stores the SHA of the last
commit.
uploaded to the `gh-pages` branch to publish the demo. The `dist/` directory is
not stored in the repository; the `gh-pages` branch contains the `version`
file with the SHA of the last commit.

Both release and development builds are copied into `docs/` by default. To use a different folder, adjust the copy steps in the workflow files:
`.github/workflows/build.yml` lines **51–54** and `.github/workflows/release.yml` lines **51–56**.
Both release and development builds are deployed to `gh-pages`. To use a different location, adjust the deployment steps in the workflow files:
`.github/workflows/build.yml` and `.github/workflows/release.yml`.

When using Trunk, open **`index.html`** (served automatically when using `trunk serve`). The file contains a Trunk hook so the WASM is loaded for you:

Expand Down
67 changes: 0 additions & 67 deletions docs/dev/index.html

This file was deleted.

Loading
Loading