From 1aa121e90af84f2cad64a05370784a243f063b01 Mon Sep 17 00:00:00 2001 From: gandalfr-ky Date: Wed, 5 Jun 2024 17:32:24 +0900 Subject: [PATCH] make branch for build --- .github/workflows/build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb7d6e2..b6d6721 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,3 +34,17 @@ jobs: run: | source emsdk/emsdk_env.sh emcc src/cpp/matrix.cpp -o build/matrix.js -lembind -std=c++17 -s WASM=2 + + - name: Deploy to GitHub Pages + if: github.ref == 'refs/heads/main' + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git clone --depth 1 --branch gh-pages https://github.com/${{ github.repository }} gh-pages + rm -rf gh-pages/* + cp -r build/* gh-pages/ + cd gh-pages + git add . + git commit -m 'Deploy to GitHub Pages' + git push origin gh-pages + \ No newline at end of file