chore(build): build using github actions
authorxangelo <me@xangelo.ca>
Tue, 3 Dec 2024 23:43:03 +0000 (18:43 -0500)
committerxangelo <me@xangelo.ca>
Tue, 3 Dec 2024 23:43:03 +0000 (18:43 -0500)
.github/workflows/build.yml [new file with mode: 0644]

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644 (file)
index 0000000..a4e92d9
--- /dev/null
@@ -0,0 +1,32 @@
+name: Build
+
+on:
+  push:
+    branches: [ main ]
+  pull_request:
+    branches: [ main ]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v3
+    
+    - name: Setup Node.js
+      uses: actions/setup-node@v3
+      with:
+        node-version: '18.7.0'
+        cache: 'npm'
+    
+    - name: Install dependencies
+      run: npm ci
+      
+    - name: Build
+      run: npm run build:prod
+    
+    - name: Upload build artifacts
+      uses: actions/upload-artifact@v3
+      with:
+        name: dist
+        path: dist/