Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arcadeperfect committed Nov 26, 2024
1 parent 7c7d4dc commit 9eb8842
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 20 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,36 @@ name: Deploy to GitHub Pages

on:
push:
branches: [ main ]
branches: [ main ] # or master, depending on your default branch
workflow_dispatch:

permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true

- name: Install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli
- name: Install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli

- name: Build
run: |
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --out-dir ./out/ --target web ./target/wasm32-unknown-unknown/release/bevy_wireframe.wasm
- name: Build
run: |
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --out-dir ./out/ --target web ./target/wasm32-unknown-unknown/release/bevy_wireframe.wasm
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: . # Deploy the entire repository
clean: false # Don't remove existing files
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .
branch: gh-pages
clean: true # Automatically remove deleted files from the deploy branch
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy to GitHub Pages

on:
push:
branches: [ main ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true

- name: Install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli

- name: Build
run: |
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --out-dir ./out/ --target web ./target/wasm32-unknown-unknown/release/bevy_wireframe.wasm

- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: . # Deploy the entire repository
clean: false # Don't remove existing files

0 comments on commit 9eb8842

Please sign in to comment.