Giter VIP home page Giter VIP logo

Comments (6)

jaydrogers avatar jaydrogers commented on August 19, 2024 3

Thanks a ton for the diagram! This makes sense. I'll play around with this and see if I can provide some examples that work for me.

I appreciate your attention to detail @limakzi!

from pages-action.

limakzi avatar limakzi commented on August 19, 2024 1

@andrewgbell I really appreciate this request. ❤️
@jaydrogers Cloudflare Pages and Github Environment are two completely isolated things.
Said that, I would see a proper workflow like this:

flowchart LR
    A[Pull-request has been opened] --> B[Environment has been provisioned]
    B -->|Provision| Environment
	subgraph Environment
	C[Github Environment] -. matches .- D[Cloudflare Deployment]
	end

    E[Pull-request has been merged] --> F[Environment has been decommissioned]
    F -->|Decommission| Environment

from pages-action.

rmoff avatar rmoff commented on August 19, 2024 1

FWIW I found this action that does have the option to delete when a PR is closed: https://github.com/unlike-ltd/github-actions-cloudflare-pages

from pages-action.

jaydrogers avatar jaydrogers commented on August 19, 2024

I am wondering if there will be support for this as well.

I wonder if there is a workaround that we can run via the API to delete it? Seems "hacky" to do, but it would be nice to get official word if this is planned to be supported or not before messing with the API. 🙌

Source

https://community.cloudflare.com/t/delete-cloudlfare-pages-deployments/345640

from pages-action.

jaydrogers avatar jaydrogers commented on August 19, 2024

Looking into this further, I noticed when I deleted the environment from GitHub it automatically deleted it from the CloudFlare dashboard too.

I wonder if managing this through the GitHub API might be a better approach?

https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deleting-an-environment

from pages-action.

dargmuesli avatar dargmuesli commented on August 19, 2024

The action @rmoff linked seems to use a basic api fetch: https://github.com/unlike-ltd/github-actions-cloudflare-pages/blob/main/src/cloudflare/deployment/delete.ts#L7

The pages-action also uses some fetches already, so it might be possible to adapt:

const response = await fetch(

from pages-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.