Thanks. So the full file would be as follows? Could you possibly elaborate on what precisely that `w

Thanks. So the full file would be as follows? Could you possibly elaborate on what precisely that with/environment part does? I know it's setting env vars, but what is the result of those operators i.e. the statement's intention?
name: Deploy

on:
  push:
    branches:
      - main

with:
  environment: ${{ github.ref_name == 'main' && 'worker-env-for-main' || 'worker-env-for-not-main' }}

jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Deploy
    steps:
      - uses: actions/checkout@v3
      - name: Deploy
        uses: cloudflare/wrangler-action@v3
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Was this page helpful?