File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Deploy to Needle Cloud
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+
7+ jobs :
8+ build-and-deploy :
9+ runs-on : ubuntu-latest
10+ timeout-minutes : 10
11+
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Node.js
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : ' 20.x'
20+ cache : ' npm'
21+
22+ - name : Install dependencies
23+ run : npm ci
24+
25+ - name : Build application
26+ run : npm run build
27+ env :
28+ NEEDLE_CLOUD_TOKEN : ${{ secrets.NEEDLE_CLOUD_TOKEN }}
29+
30+ - name : Deploy to Needle Cloud
31+ uses : needle-tools/deploy-to-needle-cloud-action@v1.0.1
32+ id : deploy
33+ with :
34+ token : ${{ secrets.NEEDLE_CLOUD_TOKEN }}
35+ dir : ./dist
36+ env :
37+ NODE_ENV : production
38+ NEEDLE_CLOUD_TOKEN : ${{ secrets.NEEDLE_CLOUD_TOKEN }}
39+
40+ - name : Display deployment URL
41+ run : |
42+ echo "::notice title=Deployment URL::Deployed to ${{ steps.deploy.outputs.url }}"
43+
44+ # Add to GitHub step summary (appears at bottom of workflow run)
45+ echo "## 🚀 Deployment Summary" >> $GITHUB_STEP_SUMMARY
46+ echo "Application has been successfully deployed!" >> $GITHUB_STEP_SUMMARY
47+ echo "**Deployment URL:** [${{ steps.deploy.outputs.url }}](${{ steps.deploy.outputs.url }})" >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments