diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97c20f3..47900b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,14 +36,9 @@ jobs: 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 - rsync -av --delete 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 + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + publish_branch: gh-pages + \ No newline at end of file