Frontend - Build and Deploy #116
This file contains 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: 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 |