feat: add install #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and deploy Node.js app to Azure Web App | |
| on: push | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout Github Action" | |
| uses: actions/checkout@v4 | |
| - name: Setup Node 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| cache: "npm" | |
| - name: "npm install, build, and test" | |
| run: | | |
| npm ci | |
| npm run build --if-present | |
| npm run test --if-present | |
| - name: Install production dependencies only | |
| run: | | |
| rm -rf node_modules | |
| npm ci --only=production | |
| - name: "Run Azure webapp deploy action using publish profile credentials" | |
| uses: azure/webapps-deploy@v2.2.17 | |
| with: | |
| app-name: web-with-nextjs | |
| publish-profile: ${{ secrets.AZURE_WEB_APP_PUBLISH_PROFILE }} |