Skip to content

v0.4.8

v0.4.8 #24

name: Release Frontend
on:
release:
types:
- "released"
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}-release
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install Node.js dependencies
run: npm ci -w apps/frontend
- name: Set env variables
run: |
echo "VITE_BACKEND_URL=${{ vars.BACKEND_URL }}" >> ./apps/frontend/.env
echo "VITE_AUTH_DOMAIN_URL=${{ vars.AUTH_ISSUER_URL }}" >> ./apps/frontend.env
echo "VITE_AUTH_CLIENT_ID=${{ vars.AUTH_CLIENT_ID }}" >> ./apps/frontend/.env
- name: Build application
run: npm run build -w apps/frontend
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Clear current deployment azure
run: |
az storage blob delete-batch \
--account-name="${{ vars.AZURE_FRONTEND_STORAGE_ACCOUNT }}" \
--source='$web'
- name: Deploy to azure
run: |
az storage blob upload-batch \
--account-name="${{ vars.AZURE_FRONTEND_STORAGE_ACCOUNT }}" \
--source="./apps/frontend/dist" \
--destination='$web'