Deploying to pages with github actions: Branch Settings

Hello all

I have a question regarding deployment with github actions. I set the branch as branch: production
but cloudflare pages is still deploying it as preview

How can I get around this?

Here is the current .yml file for the github actions

name: Build and Deploy to Cloudflare Pages on Release

on:
  release:
    types: [created]

jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      deployments: write
    steps:
      # checkout staging branch and build using npm with node 16
      # set process.env.CI = false to prevent build from failing
      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: staging
      - name: Use Node.js 16
        uses: actions/setup-node@v2
        with:
          node-version: 16
      - name: Set CI to false
        run: echo "CI=false" >> $GITHUB_ENV
      - name: Install dependencies
        run: yarn install
      # npx browserslist@latest --update-db
      - name: update browserslist
        run: npx browserslist@latest --update-db
      - name: Build
        run: yarn build
      - name: Publish to Cloudflare Pages
        uses: cloudflare/pages-action@v1
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          accountId: ACCOUNT_ID
          branch: production
          projectName: cortex-web-app
          directory: build
Was this page helpful?