Frontend - Build and Deploy #109
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 - Lint, Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
lint: | |
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: Install dependencies | |
run: | | |
cd kabinizer-front-end | |
npm ci | |
- name: Run ESLint | |
run: | | |
cd kabinizer-front-end | |
npm run lint | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js version | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
- 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 |