Files
entdb-entitlements-iOS/.github/workflows/build.yml
T
cc 1e512f8956 Migrate to Bun + Biome, fix CORS with same-origin data URL
- Replace Node.js/npm with Bun for faster builds
- Replace ESLint with Biome for faster linting
- Use codecolor.ist/entdb-data for data URL (same origin, no CORS)
2026-04-15 17:15:52 +02:00

65 lines
1.6 KiB
YAML

name: Build and Deploy
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
outputs:
pages_ready: ${{ steps.configure-pages.outcome == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Setup Pages
uses: actions/configure-pages@v5
id: configure-pages
continue-on-error: true
with:
static_site_generator: next
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build with Next.js
run: bun run build
env:
NEXT_PUBLIC_BASE_PATH: ${{ steps.configure-pages.outputs.base_path || '' }}
NEXT_PUBLIC_DATA_URL: https://codecolor.ist/entdb-data
- name: Upload artifact
if: steps.configure-pages.outcome == 'success'
uses: actions/upload-pages-artifact@v3
with:
path: ./out
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
if: >-
needs.build.outputs.pages_ready == 'true' &&
((github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') ||
github.event_name == 'repository_dispatch')
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4