@@ -23,37 +23,44 @@ jobs:
2323 with :
2424 node-version : ' 22.x'
2525
26+ # Next.js requires environment variables to be present during the build step
2627 - name : npm install, build, and test
28+ env :
29+ GEMINI_API_KEY : ${{ secrets.GEMINI_API_KEY }}
30+ MONGODB_URI : ${{ secrets.MONGODB_URI }}
2731 run : |
28- npm install
32+ npm install --force
2933 npm run build --if-present
30- npm run test --if-present
3134
35+ # Upload everything, explicitly ensuring hidden folders like .next are included
3236 - name : Upload artifact for deployment job
3337 uses : actions/upload-artifact@v4
3438 with :
3539 name : node-app
36- path : .
40+ path : |
41+ .
42+ !.git
43+ !.github
3744
3845 deploy :
3946 runs-on : ubuntu-latest
4047 needs : build
41- permissions :
42- id-token : write # This is required for requesting the JWT
43- contents : read # This is required for actions/checkout
48+ permissions :
49+ id-token : write # This is required for requesting the JWT
50+ contents : read # This is required for actions/checkout
4451
4552 steps :
4653 - name : Download artifact from build job
4754 uses : actions/download-artifact@v4
4855 with :
4956 name : node-app
50-
51- - name : Login to Azure
52- uses : azure/login@v2
53- with :
54- client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_3F1C601741E84A3E9F282ED5701E4C32 }}
55- tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_1692174EC7E34A89AB15BD3FF8308662 }}
56- subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_2ACC7569C3824F8F9D84CBF6C99075DA }}
57+
58+ - name : Login to Azure
59+ uses : azure/login@v2
60+ with :
61+ client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_3F1C601741E84A3E9F282ED5701E4C32 }}
62+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_1692174EC7E34A89AB15BD3FF8308662 }}
63+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_2ACC7569C3824F8F9D84CBF6C99075DA }}
5764
5865 - name : ' Deploy to Azure Web App'
5966 id : deploy-to-webapp
0 commit comments