Giter Site home page Giter Site logo

Comments (4)

rossjrw avatar rossjrw commented on May 16, 2024 2

Noting that I've looked into this a little further, detailing some thoughts here: https://github.com/orgs/community/discussions/30113#discussioncomment-7650234

I'm not sure that the artifact-based deployment method has the versatility to support this action. @MattF-NSIDC raises some excellent points and I think I would have come to the same conclusions.

Looking at the 'preview' parameter of actions/deploy-pages that MattF linked, it looks like that parameter gets sent to the /repos/{owner}/{repo}/pages/deployments octokit endpoint as part of the payload. Octokit docs state 'The payload parameter is available for any extra information that a deployment system might need'... so I actually have no idea where that parameter ends up being used or what it does.

It sounds like the actions/deploy-pages maintainers don't have a timeline for it either (actions/deploy-pages#180) so I'm not particularly hopeful. If it does end up working how MattF hypothesises I'll probably jump ship to it straight away, but I'm not going to dwell on it in the meantime.

But now when your next atomic production deploy comes through, the preview is overwritten! Not as simple as I first thought to work around this.

Ironically the ideal solution to this IMO would be something Git-based... maybe the deployment artifact could be a Git repository? Maybe streamline that to be a branch of the current repository? What if you could deploy Pages directly from a branch? 😛

from pr-preview-action.

rossjrw avatar rossjrw commented on May 16, 2024

I'm afraid I don't currently have any examples - the above workflow is new to me! I'll make sure to assess whether the two can be reconciled at some point in the future - thanks for bringing it up.

from pr-preview-action.

vincerubinetti avatar vincerubinetti commented on May 16, 2024

I wonder if the new "Pages from Actions" option would even support something like this? Also, if people haven't seen this yet, GitHub is supposedly working on integrating this feature directly into GitHub. It'd be nice to not have to link Netlify to repos anymore!

from pr-preview-action.

MattF-NSIDC avatar MattF-NSIDC commented on May 16, 2024

I wonder if the new "Pages from Actions" option would even support something like this?

I think it's much harder with the "Pages from Actions" workflow, and requires sacrificing atomicity. With "Pages from branch", you can add a subdirectory easily to the gh-pages branch. With "Pages from Actions", all deployments are atomic, like Netlify deploys, which is great. Until you want to do something like add a directory to a deployed site. That might look like:

  • Download the currently-deployed site (how?);
  • add a subdirectory to the local copy;
  • push that new directory structure as a pages artifact;
  • actions/deploy-pages.

But now when your next atomic production deploy comes through, the preview is overwritten! Not as simple as I first thought to work around this. So I went with Netlify.

I'm hoping the feature GitHub is working on enables both atomic preview deploys (like Netlify) and atomic production deploys that can't step on each-others' toes, e.g. previews deploy to preview-pr-N.mysite.github.io or something 🤷

from pr-preview-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.