Skip to content

Commit

Permalink
Publish to pages on release
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Dec 21, 2020
1 parent d801c79 commit 6b442b5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,32 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pages:
name: Pages
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.15

- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build
run: go build -ldflags="-s -w" -v -o go-mlog.wasm .
env:
GOOS: js
GOARCH: wasm

- name: Prepare deploymnet
run: mkdir pages && cp go-mlog.wasm pages/ && cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" pages/

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./pages

0 comments on commit 6b442b5

Please sign in to comment.