Hello,
is there a chance to overwrite the branch name:
|
const {stdout} = await execFileAsync( |
|
'npx', |
|
[ |
|
`wrangler@${WRANGLER_VERSION}`, |
|
'pages', |
|
'deploy', |
|
directory, |
|
'--project-name', |
|
projectName, |
|
'--branch', |
|
branch, |
|
'--commit-dirty=true', |
|
'--commit-hash', |
|
commitHash |
|
], |
|
{ |
|
env: process.env, |
|
cwd: workingDirectory |
|
} |
|
) |
Because, if I'm using the action via workflow_run and the PR is created based on a fork from the main branch (exmaple) it overwrite the main/production deployment. But I would like to create a preview, for example, with pr-XXX
To be honst, I don't get the part in the your docs:
github-environment: ${{ (github.ref == 'refs/heads/main' && 'production') || 'preview' }}
I just have one environment on GitHub which represents a page in Cloudflare. Inside the Cloudflare page, I have different environments (Production & Preview). Production always has a main as source and preview pr-xxxx.
Thank you for your assistance.
Hello,
is there a chance to overwrite the
branchname:github-actions-cloudflare-pages/src/common/cloudflare/deployment/create.ts
Lines 49 to 68 in ec3debf
Because, if I'm using the action via
workflow_runand the PR is created based on a fork from themainbranch (exmaple) it overwrite the main/production deployment. But I would like to create a preview, for example, withpr-XXXTo be honst, I don't get the part in the your docs:
I just have one environment on GitHub which represents a page in Cloudflare. Inside the Cloudflare page, I have different environments (Production & Preview). Production always has a
mainas source and previewpr-xxxx.Thank you for your assistance.