diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml new file mode 100644 index 0000000..cbcba3a --- /dev/null +++ b/.github/workflows/build-and-publish.yml @@ -0,0 +1,25 @@ +name: Build and Publish + +on: + push: + branches: + - main + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Run build script + run: ./build.sh + + - name: Publish to gh-pages branch + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_BRANCH: gh-pages + publish_dir: ./dist