Skip to content

Commit f7822fc

Browse files
committed
github deployment
1 parent 7787c58 commit f7822fc

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and Deploy Vite App to Needle Cloud
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20.x'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build Vite project
28+
run: npm run build
29+
30+
- name: Deploy to Needle Cloud
31+
run: npx --yes needle-cloud deploy ./dist --name vite-template --token ${{ secrets.NEEDLE_API_TOKEN }}
32+
env:
33+
NODE_ENV: production

0 commit comments

Comments
 (0)