Skip to content

chore: add cf deployment #5

chore: add cf deployment

chore: add cf deployment #5

name: Cloudflare Deploy Widget
on:
push:
branches:
- main
paths:
- 'packages/widget/**'
pull_request:
branches:
- main
paths:
- 'packages/widget/**'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 18
- run: corepack enable
- run: yarn set version stable
- run: yarn install --immutable
- run: yarn run lint:all
- run: yarn run build:all
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: sygma-widget
directory: ./packages/widget/build
branch: main
gitHubToken: ${{ secrets.GITHUB_TOKEN }}