Skip to content

Frontend - Build and Deploy #116

Frontend - Build and Deploy

Frontend - Build and Deploy #116

name: Frontend - Build and Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Cache node_modules
uses: actions/cache@v4
with:
path: kabinizer-front-end/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('kabinizer-front-end/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install, build
run: |
cd kabinizer-front-end
npm ci
npm run build
- name: "Deploy to Azure Web App"
uses: azure/webapps-deploy@v2
id: deploy-to-webapp
with:
app-name: "app-kabinizer-client-dev"
slot-name: "Production"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_C4AAEA8978394A6FB11867CD9D72BE91 }}
package: ./kabinizer-front-end/dist