From 5327a99361e97ed978b6e7b7dbdeca5d24f84920 Mon Sep 17 00:00:00 2001 From: Alicja <32685541+alicja-januszkiewicz@users.noreply.github.com> Date: Wed, 1 May 2024 00:26:56 +0100 Subject: [PATCH] Create build-deploy-wasm.yml --- .github/workflows/build-deploy-wasm.yml | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build-deploy-wasm.yml diff --git a/.github/workflows/build-deploy-wasm.yml b/.github/workflows/build-deploy-wasm.yml new file mode 100644 index 0000000..ba1f1b1 --- /dev/null +++ b/.github/workflows/build-deploy-wasm.yml @@ -0,0 +1,29 @@ +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: Build app + run: ./wasm-bindgen-macroquad.sh cubic --release + + - name: Deploy to gh-pages + run: | + git config --global user.email "d.januszkiewicz@gmail.com" + 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