Skip to content

Merge pull request #8 from L4Ph/vite6-beta #38

Merge pull request #8 from L4Ph/vite6-beta

Merge pull request #8 from L4Ph/vite6-beta #38

Workflow file for this run

name: Deploy
on:
pull_request:
branches:
- main
paths:
- src/**
push:
branches:
- main
paths:
- src/**
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name == 'main' && 'Production' || 'Preview' }}
url: ${{ steps.deployment_url.outputs.DEPLOYMENT_URL }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: install deps
run: rm -rf node_modules && bun install --frozen-lockfile
- name: build
run: bun run build
- name: deploy
id: cloudflare-wrangler
uses: cloudflare/wrangler-action@v3
with:
packageManager: bun
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy ./build --project-name=tawri --branch ${{ github.ref_name == 'main' && 'main' || 'preview' }}
- name: Get deployment url
id: deployment_url
run: echo "DEPLOYMENT_URL=${{ steps.cloudflare-wrangler.outputs.deployment-url }}" >> $GITHUB_ENV