Skip to content

feat: update for build chrome extension #13

feat: update for build chrome extension

feat: update for build chrome extension #13

name: Cloudflare Preview Build
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build-preview:
runs-on: ubuntu-latest
if: github.repository == 'doocs/md'
steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up node
uses: actions/setup-node@v6
with:
node-version: 22
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Build for Cloudflare Workers
run: pnpm web build:h5-netlify
env:
CF_WORKERS: 1
- name: Upload deployment package
uses: actions/upload-artifact@v4
with:
name: cloudflare-dist
path: apps/web/dist/**
retention-days: 5
- name: Save PR number
if: ${{ always() }}
run: echo ${{ github.event.number }} > ./pr-id.txt
- name: Upload PR number
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: cloudflare-pr
path: ./pr-id.txt