GithubHelp home page GithubHelp logo

cf-pages-await's Introduction

Hi ๐Ÿ‘‹, I'm Walshy

Fullstack Software Engineer at Cloudflare working on Pages

Buy Me A Pizza

๐Ÿงญ Social Links

What I do

My day to day is writing Golang and TypeScript/JavaScript. I still write some Java but it's more reviewing these days. Follow me on Twitter to see what I'm doing, I forget to update this.

cf-pages-await's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cf-pages-await's Issues

Accept API Tokens

Users can now use API token with Cloudflare Pages (yay!). This Action currently only accepts global API keys. Let's update to take either and update docs to encourage API token usage?

Check if deployment is skipped/custom timeout

I have my cloudflare pages only set to deploy on dev and main branches, the others are skipped:
image
However it did trigger my github actions which awaited for the maximum of 6 hours after which github kills the worker:
image
This ate my free github actions time :/

Either make it fully reliable (it also doesn't work when there are two back to back commits where a CF deployment is queued) OR allow a custom (10 minutes would suffice for me) timeout after which the awaiting stops.

README does not point to Token template

Hey I'm hitting a authentification error and it might be because I did not user the proper template (or overall permission) when I created the token.

Is there any specific direction as to which kind of CloudFlare Token we should create?

Thanks a ton!

"Waiting for the deployment to start" when used in Workflows that create new commits

I'm using this action in a workflow that uses semantic-release to automatically generate release commits.

cf-pages-await uses the variable GITHUB_SHA to refer to the original commit invoking the workflow, but my latest commit is always newer because of semantic-release. So it "[waits] for the deployment to start" forever.

It would be nice to have the ability to toggle whether this action checks for a commit match or just wait for the latest build blindly.

My solution to this for now is to rearrange my action so that I wait for the Cloudflare Pages build first, do my post-build tasks, then run the release. No big deal at all.

This problem would also get naturally solved by support to filter out commits from auto deployment on Cloudflare Pages with, e.g., skip ci in the message.

Return outputs on build failure

I am trying to run some GH actions by gathering the CloudFlare build logs (even on build failure).

It seems that at the moment the script is only configured to return outputs in the case the build succeeds.

Would it be possible to add a flag to make it return outputs (like deployment id) on build failure as well?
Not sure if we can access continue-on-error from within the action.

Let me know and I'd be happy to create a PR

Error when GitHub token not provided

The function is called regardless whether the GitHub token is provided or not.

if (latestStage.status === 'failed') {
waiting = false;
core.setFailed(`Deployment failed on step: ${latestStage.name}!`);
await updateDeployment(token, deployment, 'failure');
return;
}

So it will throw an error from octokit.

Wait for a specfied commit's deployment

Sometimes when I pushed a commit in GitHub Actions to a branch to trigger CF Pages's build, a new deployment won't always be created immediately. I think we should accept a commit ref and check if the ref exists in the deployments array.

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.