File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -47,24 +47,32 @@ jobs:
4747              "npm": "10.x" 
4848            }, 
4949            "scripts": { 
50-               "start": "npx [email protected]  -s . -p $PORT" 50+               "start": "node server.js" 
51+             }, 
52+             "dependencies": { 
53+               "express": "^4.18.2", 
54+               "compression": "^1.7.4" 
5155            } 
5256          } 
5357          EOF 
5458
55-       - name : Verify build output 
59+       - name : Copy server.js to dist 
60+         run : cp server.js dist/ 
61+       
62+       - name : Install production dependencies 
5663        run : | 
5764          cd dist 
58-           echo "Build output verification:" 
59-           ls -la 
60-           echo "Package.json content:" 
61-           cat package.json 
65+           npm install --only=production 
66+            
67+           # Verify express installation 
68+           echo "Verifying express installation:" 
69+           ls -la node_modules/express/ 
6270
63-       - name : Upload artifact (contents of dist folder only)  
71+       - name : Upload artifact 
6472        uses : actions/upload-artifact@v4 
6573        with :
6674          name : webapp 
67-           path : dist/  
75+           path : dist 
6876
6977  deploy :
7078    runs-on : ubuntu-latest 
7886        uses : actions/download-artifact@v4 
7987        with :
8088          name : webapp 
81-           path : . 
82-       
83-       - name : Verify deployment package 
84-         run : | 
85-           echo "Deployment package contents:" 
86-           ls -la 
87-           echo "Package.json:" 
88-           cat package.json 
8989
9090      - name : Login to Azure 
9191        uses : azure/login@v2 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments