Closed stavros-k closed 1 month ago
This would also help use cases such as monorepos, allowing to just create a new project on the monorepo and it automatically having a cloudfare pages instance to preview it ready to go.
Hello! We're working on porting this repo to wrangler-action, and stepping up maintenance there. This functionality doesn't exist in wrangler today, so we cannot support it from an action. You can request it as a feature in the workers-sdk repo. In the meantime, I suggest that you add an if statement to your yaml to check to see if the project exists. You can then create it before moving on to the deploy step.
It would be nice, when making a publish, check if the project exists, and if not. create it.
That will also require to have an extra option to define which the
production
branch will be. Like you do withwrangler pages project create PROJECT-NAME --production-branch=NAME-OF-PROD-BRANCH
Use case, we publish multiple sites from a base template that builds on CI for each store. It will save some time if we just had to add the store details in the CI matrix, and the action took care of the project creation.