Skip to content

Commit 6c273aa

Browse files
committed
pleaaaaase
1 parent cd4eb2c commit 6c273aa

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

.github/workflows/pages.yml

+24-9
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,45 @@ on:
1111
# workflow_run:
1212
# workflows: [Continuous integration]
1313
# types: [completed]
14-
# branches: [main]
14+
# branches: [main]
1515

1616
jobs:
1717
release:
1818
runs-on: ubuntu-latest
1919
steps:
2020
# Checkout the repository
2121
- uses: actions/checkout@v2
22+
2223
# Install the stable toolchain for Rust and target WASM
2324
- uses: actions-rs/toolchain@v1
2425
with:
2526
toolchain: stable
2627
target: wasm32-unknown-unknown
27-
- name: Rust Cache #cache build artifacts
28+
29+
# Cache Rust build artifacts
30+
- name: Rust Cache
2831
uses: Swatinem/rust-cache@v1
32+
2933
# Build the WASM with trunk
30-
- uses: jetli/trunk-action@v0.1.0
34+
- name: Build with Trunk
35+
run: ./trunk build --release --public-url $public_url
36+
env:
37+
public_url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
38+
3139
# Use wasm-bindgen to prepare the bindings
3240
- uses: jetli/wasm-bindgen-action@v0.1.0
41+
3342
# Build the project in release mode
34-
- run: trunk build --release
35-
# Deploy to GitHub Pages using the gh-pages branch
36-
- uses: peaceiris/actions-gh-pages@v3
43+
- name: Build
44+
run: ./trunk build --release --public-url $public_url
45+
env:
46+
public_url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
47+
48+
# Deploy to GitHub Pages
49+
- name: Deploy
50+
uses: JamesIves/github-pages-deploy-action@v4
3751
with:
38-
github_token: ${{ secrets.GITHUB_TOKEN }}
39-
publish_branch: gh-pages
40-
publish_dir: ./dist
52+
folder: dist
53+
# This option will not maintain any history of your previous pages deployment
54+
# Set to false if you want all page builds to be committed to your gh-pages branch history
55+
single-commit: true

0 commit comments

Comments
 (0)