cloudflare / pages-action

MIT License
468 stars 95 forks source link

Feature Request - Allow better control of Alias/Environment #52

Closed carl-armis closed 1 year ago

carl-armis commented 1 year ago

Currently when using the GitHub Action method of deploying Cloudflare Pages, we are unable to control the alias or environment of the triggered deployment.

Request to add the following parameters:

Without this, there doesn't seem to be much of a purpose to defining a custom URL in the project

Ideally we would be able to define the following


        uses: cloudflare/pages-action@v1
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          accountId: YOUR_ACCOUNT_ID
          projectName: YOUR_PROJECT_NAME
          directory: YOUR_ASSET_DIRECTORY
          # Optional: Enable this if you want to have GitHub Deployments triggered
          gitHubToken: ${{ secrets.GITHUB_TOKEN }}
          alias: YOUR_ALIAS
          environment: YOU_ENVIRONMENT
GregBrimble commented 1 year ago

Hi! The environment of a deployment is determined by the branch you use. Ordinarily, this will be set automatically by GitHub when running the Pages Action, but this can be overwritten: https://github.com/cloudflare/pages-action#specifying-a-branch.

The alias is also determined from the branch and cannot be specified. We have no plans at present to allow overriding this.