diff --git a/.github/workflows/deploy-web.yml b/.github/workflows/deploy-web.yml new file mode 100644 index 0000000..7d5b53d --- /dev/null +++ b/.github/workflows/deploy-web.yml @@ -0,0 +1,32 @@ +name: Deploy Web +on: + push: + branches: + - master +permissions: + contents: read + pages: write + id-token: write +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v2 + with: + go-version: '^1.21' + - run: go build -o web/game.wasm + env: + GOOS: js + GOARCH: wasm + - run: cp $(go env GOROOT)/misc/wasm/wasm_exec.js web/ + + - uses: actions/configure-pages@v2 + - uses: actions/upload-pages-artifact@v1 + with: + path: web + - id: deployment + uses: actions/deploy-pages@v1 diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..dd26e9b --- /dev/null +++ b/web/index.html @@ -0,0 +1,15 @@ + + +
+ + diff --git a/web/main.html b/web/main.html new file mode 100644 index 0000000..8e31d14 --- /dev/null +++ b/web/main.html @@ -0,0 +1,16 @@ + + +