Update build-deploy-wasm.yml #5
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
name: Build and Deploy to gh-pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure rustup | |
run: | | |
rustup install nightly | |
rustup default nightly | |
rustup target add wasm32-unknown-unknown | |
- name: Build app | |
run: ./wasm-bindgen-macroquad.sh cubic --release | |
- name: Deploy to gh-pages | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Alicja Januszkiewicz" | |
git checkout --orphan gh-pages | |
git rm -rf . | |
git clean -dfx | |
mv dist/* . # Move artifacts to root directory | |
git add . | |
git commit -m "Deploy binary artifact to gh-pages" | |
git push origin gh-pages --force |