File tree Expand file tree Collapse file tree 4 files changed +25
-9
lines changed
Expand file tree Collapse file tree 4 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 1010jobs :
1111 build-and-deploy :
1212 runs-on : ubuntu-latest
13- timeout-minutes : 5
13+ timeout-minutes : 10
1414
1515 steps :
1616 - name : Checkout repository
3131 NEEDLE_CLOUD_TOKEN : ${{ secrets.NEEDLE_CLOUD_TOKEN }}
3232
3333 - name : Deploy to Needle Cloud
34- run : npx needle-cloud deploy ./dist --name vite-template --token ${{ secrets.NEEDLE_CLOUD_TOKEN }}
34+ id : deploy
35+ run : |
36+ # Run the deployment command and capture output
37+ DEPLOY_OUTPUT=$(npx needle-cloud deploy ./dist --name vite-template --token ${{ secrets.NEEDLE_CLOUD_TOKEN }})
38+
39+ # Extract the URL from the output (adjust the grep pattern as needed)
40+ DEPLOY_URL=$(echo "$DEPLOY_OUTPUT" | grep -o 'https://[^ ]*' | head -1)
41+
42+ # Set the URL as an output variable
43+ echo "deploy_url=$DEPLOY_URL" >> $GITHUB_OUTPUT
44+
45+ # Add URL to the job summary
46+ echo "## 🚀 Deployment Complete!" >> $GITHUB_STEP_SUMMARY
47+ echo "Deployed to: [$DEPLOY_URL]($DEPLOY_URL)" >> $GITHUB_STEP_SUMMARY
3548 env :
3649 NODE_ENV : production
37- NEEDLE_CLOUD_TOKEN : ${{ secrets.NEEDLE_CLOUD_TOKEN }}
50+ NEEDLE_CLOUD_TOKEN : ${{ secrets.NEEDLE_CLOUD_TOKEN }}
51+
52+ - name : Display deployment URL
53+ run : |
54+ echo "::notice title=Deployment URL::Deployed to ${{ steps.deploy.outputs.deploy_url }}"
Original file line number Diff line number Diff line change 77 "build:production" : " vite build -- --production"
88 },
99 "dependencies" : {
10- "@needle-tools/engine" : " ^4.4.0-beta" ,
10+ "@needle-tools/engine" : " ^4.4.0-beta.2 " ,
1111 "three" : " npm:@needle-tools/three@^0.169.0"
1212 },
1313 "devDependencies" : {
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ export default defineConfig(async ({ command }) => {
2121 build : {
2222 outDir : "./dist" ,
2323 emptyOutDir : true ,
24- keepNames : true ,
2524 }
2625 }
2726} ) ;
You can’t perform that action at this time.
0 commit comments