Skip to content

chore(ci/cd): Deploy prebuilt Bun dist #22

chore(ci/cd): Deploy prebuilt Bun dist

chore(ci/cd): Deploy prebuilt Bun dist #22

Workflow file for this run

name: Deploy TinyIt UI
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Bun
run: |
curl -fsSL https://bun.sh/install | bash
echo "$HOME/.bun/bin" >> $GITHUB_PATH
- name: Install dependencies with Bun
run: bun install --frozen-lockfile
- name: Create .env.production file
run: echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" > .env.production
- name: Build the project
run: bun run build
- name: Copy Static Web Apps config into build output
run: cp staticwebapp.config.json dist/staticwebapp.config.json
- name: Deploy to Azure Static Web Apps
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "dist"
output_location: ""
skip_app_build: true