Skip to content

setup automatic frontend deployment #1

setup automatic frontend deployment

setup automatic frontend deployment #1

Workflow file for this run

name: Deploy frontend
on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- synchronize
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
working-directory: apps/frontend
run: bun install --frozen-lockfile
- name: Build
working-directory: apps/frontend
run: bun run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@main
with:
apiToken: ${{ secrets.CF_PAGES_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
projectName: data-maki
directory: ./dist/client
workingDirectory: apps/frontend
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: "3"