Code Monkey home page Code Monkey logo

pages-trigger's Introduction

pages-trigger

Ad-hoc deployments for Cloudflare Pages projects using GitHub Actions

This codebase allows you to use the "Create deployment" endpoint to arbitrarily deploy existing projects, using GitHub Actions.

Setup

Fork this repository and set the following secrets in your project's Secrets page:

  • CF_API_KEY: your Global API Key. In the future, you'll be able to set a Pages-specific API token that only has access to your Pages projects, but for now, your Global API Key gives you access to Pages resources.
  • CF_ACCOUNT_ID: the Cloudflare Account ID that contains your Pages projects.
  • CF_EMAIL: your Cloudflare email.

Usage

Workflow Dispatch (UI deployment)

Visit the Actions tab on your repository - you may need to manually enable Actions running on your repo fork. Once enabled, go to the "Deploy Pages project" workflow, and manually trigger a deploy in the UI, providing a project name to deploy.

UI Deployment

Repository Dispatch (API/automatic deployment)

You can automate deployments using this workflow via the repository_dispatch event. Send an API request to your repo's dispatch endpoint (POST /repos/{owner}/{repo}/dispatches), specifying a project_name inside of the client_payload. For an example cURL request, see examples/repository_dispatch.sh.

pages-trigger's People

Contributors

kristianfreeman avatar

Stargazers

Kristóf Poduszló avatar HeisenBerg? avatar Justin Noel avatar Rick Cogley avatar Kevin Deamandel avatar  avatar David avatar  avatar Amith Mohanan avatar Tyler Brostrom avatar  avatar  avatar Patryk Padus avatar  avatar Matthias Fostel avatar  avatar TED Vortex (Teodor-Eugen Duțulescu) avatar Erisa A avatar

Watchers

 avatar Tyler Brostrom avatar  avatar

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.