-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WASM package for web repl * Yew web app for REPL * Basic styles with Tailwind * Handle numbers correctly * Add default value to demo Markdown * Update README * Build for deployment * Add Cloudflare deployment * Deploy on main only * Add cache
- Loading branch information
Showing
11 changed files
with
1,269 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Deploy Web | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: WASM build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
deployments: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
targets: wasm32-unknown-unknown | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
name: Rust cache | ||
|
||
- name: Install Trunk | ||
run: cargo install trunk | ||
|
||
- name: Build | ||
run: trunk build --release | ||
working-directory: ./web_repl | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: | | ||
web_repl/dist | ||
- name: Publish to Cloudflare Pages | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} | ||
directory: web_repl/dist | ||
# Optional: Enable this if you want to have GitHub Deployments triggered | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | ||
# Optional: Switch what branch you are publishing to. | ||
# By default this will be the branch which triggered this workflow | ||
branch: main | ||
# Optional: Change the working directory | ||
# workingDirectory: my-site | ||
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta` | ||
wranglerVersion: "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.vscode | ||
.zed | ||
.DS_Store | ||
dist |
Oops, something went wrong.