Skip to content

Frontend - Build and Deploy #104

Frontend - Build and Deploy

Frontend - Build and Deploy #104

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Frontend - Build and Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: "18.x"
- name: bun install, build
run: |
cd kabinizer-front-end
bun install
bun run build
rm -rf node_modules
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: node-app
path: ./kabinizer-front-end/dist
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: node-app
- 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: .