Skip to content

Commit 1de97f6

Browse files
committed
feat: deploy workflow
1 parent 714756a commit 1de97f6

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: "pages"
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
name: Build
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: jetli/[email protected]
19+
with:
20+
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
21+
version: "latest"
22+
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- uses: actions-rust-lang/setup-rust-toolchain@v1
27+
with:
28+
rustflags: "-A warnings"
29+
30+
- uses: actions/checkout@v4
31+
with:
32+
repository: aspizu/goboscript
33+
path: ./goboscript
34+
35+
- run: |
36+
cd goboscript
37+
git checkout -b wasm
38+
git pull origin main
39+
wasm-pack build
40+
41+
- name: Setup Bun
42+
uses: oven-sh/setup-bun@v2
43+
44+
- name: Install Dependencies
45+
run: bun install
46+
47+
- name: Build
48+
run: bun run build
49+
50+
- name: Upload Artifact
51+
uses: actions/upload-pages-artifact@v3
52+
with:
53+
name: github-pages
54+
path: ./dist
55+
56+
deploy:
57+
name: Deploy
58+
runs-on: ubuntu-latest
59+
needs: build
60+
permissions:
61+
pages: write
62+
id-token: write
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deploy.outputs.page_url }}
66+
steps:
67+
- name: Deploy to GitHub Pages
68+
id: deploy
69+
uses: actions/deploy-pages@v4

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"cmdk": "^1.1.1",
4949
"date-fns": "^4.1.0",
5050
"embla-carousel-react": "^8.6.0",
51-
"goboscript": "file:../goboscript/pkg",
51+
"goboscript": "file:./goboscript/pkg",
5252
"input-otp": "^1.4.2",
5353
"lucide-react": "^0.511.0",
5454
"monaco-editor": "^0.52.2",

0 commit comments

Comments
 (0)