-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.32 KB
/
deploy.yml
File metadata and controls
50 lines (41 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build and Deploy
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
check-latest: true
- name: Build WASM
run: |
cd wasm-build
go get -u github.com/php-any/origami@main
go mod tidy
GOOS=js GOARCH=wasm go build -o ../public/wasm/origami.wasm .
# Copy wasm_exec.js from GOROOT to public folder
cp $(go env GOROOT)/misc/wasm/wasm_exec.js ../public/wasm_exec.js
cd ..
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install Dependencies
run: npm install
- name: Build Frontend
run: npm run build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: gh-pages