Skip to content

ci: add production condition for deployment based on event type and b… #5

ci: add production condition for deployment based on event type and b…

ci: add production condition for deployment based on event type and b… #5

Workflow file for this run

name: Deploy to Cloudflare Pages
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install Dependencies
run: bun install
- name: Install Playwright
run: bunx playwright install --with-deps
- name: Build
run: bun run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: helmyl-com
directory: build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
production: ${{ github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' }}