Skip to content

Commit

Permalink
Add github page deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
sg0hsmt committed Jan 3, 2022
1 parent dc20495 commit 8b4ca1f
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: GitHub Pages
on:
push:
tags:
- v*
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.x"
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: go test -race ./...
working-directory: ./demo
- name: Build
run: |
GOARCH=wasm GOOS=js go build -o dist/web/app.wasm
go run main.go -ssg=dist -prefix=budoux-go
working-directory: ./demo
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./demo/dist
force_orphan: true

0 comments on commit 8b4ca1f

Please sign in to comment.