Skip to content

Commit

Permalink
chore(deploy): add deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoliveira21 committed Dec 17, 2023
1 parent e445be1 commit 6bde3ea
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: gh-pages-deploy

on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'

- name: Install dependencies
run: go get .

- name: Test with Go CLI
run: go test ./...

- name: Build WASM
run: GOOS=js GOARCH=wasm go build -o ./web/public/chip8.wasm ./web/web.go

- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./web/public
Binary file removed web/chip8.wasm
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6bde3ea

Please sign in to comment.