Giter Club home page Giter Club logo

Comments (11)

yoannchaudet avatar yoannchaudet commented on September 20, 2024 2

@natemoo-re Correct, configure-pages can only inject configuration for frameworks it knows about (see list). If Astro has CLI support for configuring base/site, this is much better since we don't need to try and parse some random abstract syntax tree (i.e. configuration as code).

For a framework that has CLI support, the congigure-pages action can be used to just find out which URL the site will be deployed to. It gets consumed this way (example for Hugo): https://github.com/actions/starter-workflows/blob/ba77264174b7267793c7960a18718f941bf21b76/pages/hugo.yml#L51-L54

from configure-pages.

natemoo-re avatar natemoo-re commented on September 20, 2024 1

For a framework that has CLI support, the congigure-pages action can be used to just find out which URL the site will be deployed to. It gets consumed this way (example for Hugo): https://github.com/actions/starter-workflows/blob/ba77264174b7267793c7960a18718f941bf21b76/pages/hugo.yml#L51-L54

Ah that's great! In that case, it probably makes the most sense to integrate configure-pages inside of withastro/action and then contribute a starter workflow to actions/starter-workflows? If so, there's nothing that needs to happen in this repo.

Thanks for sharing your thoughts!

from configure-pages.

yoannchaudet avatar yoannchaudet commented on September 20, 2024

Hugo is already supported, example: https://github.com/actions/starter-workflows/blob/main/pages/hugo.yml.

Same for Jekyll, example: https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml

Generally, static site generators that leverage CLI arguments or environment variables are all supported. Node based static generators love to have their configuration expressed as code which hinder "magic" configuration.

I have no idea what you mean by "support for build tools". Would you mind elaborating?

from configure-pages.

natemoo-re avatar natemoo-re commented on September 20, 2024

๐Ÿ‘‹๐Ÿป Hey there, core member of Astro here. Would love to help deliver official support for Astro! All the relevant config options should be supported as CLI arguments as well, but if that's not the case, we can make it happen on our end.

@nickmccurdy opened this PR to add actions/configure-pages@v2 to the official withastro/action, but it didn't seem to work when I tried it. I wasn't able to debug it more... Does the configure-pages action only work for frameworks that are explicitly handled in this repo?

from configure-pages.

natemoo-re avatar natemoo-re commented on September 20, 2024

๐Ÿ‘†๐Ÿป I realized that the Astro CLI did allow --site but didn't allow --base. That should be fixed very soon!

from configure-pages.

yoannchaudet avatar yoannchaudet commented on September 20, 2024

Correct nothing needs to happen in this repo for Astro :) (or I hope so at least). I'll be happy to help get an Astro starter workflow in actions/starter-workflows. @adrianmg has opened a PR already that can serve as a base (there is a bit more work needed there and hopefully if Astro can be setup with the CLI only, we could have it work for all Pages site "out of the box").

from configure-pages.

oliverbenns avatar oliverbenns commented on September 20, 2024

I was about to commit a pages workflow to actions/starter-workflows but saw this in the PR template, but then see this issue so not really sure what's happening here. Some clarity would be appreciated :)

Please note that at this time we are only accepting new starter workflows for Code Scanning. Updates to existing starter workflows are fine.

I also need to sign up to be a GitHub Technology Partner. All I really want to do is commit a yml file to help others but it seems I need to go over leaps and bounds just to contribute which is a bit disappointing.

Anyway, if someone wants to take this commit for create react app, you're more than welcome: oliverbenns/starter-workflows@dae1f02

from configure-pages.

JamesMGreene avatar JamesMGreene commented on September 20, 2024

The official GitHub Pages starter workflow for Astro will soon cover the appropriate configurations via the Astro CLI --site and --base parameters: actions/starter-workflows#1833

from configure-pages.

JamesMGreene avatar JamesMGreene commented on September 20, 2024

Going to close this out as all of the mentioned SSGs have corresponding Pages starter workflows: https://github.com/actions/starter-workflows/blob/main/pages/

As far as supporting the random build tools, that feels out-of-scope to me. ๐Ÿคท๐Ÿปโ€โ™‚๏ธ

If you have one you really want support for, we'd at least be open to reviewing a PR. ๐Ÿ”

from configure-pages.

nickserv avatar nickserv commented on September 20, 2024

Can you please explain why you feel the build tools are out of scope? I understand GitHub Pages is frequently used with SSGs, but I also feel it's valid to use it with build tools for SPAs, which I still use frequently. I think it would be nice to have a simpler way to configure those tools for GitHub Pages, regardless of whether they prerender, as they can still work on any static server.

from configure-pages.

JamesMGreene avatar JamesMGreene commented on September 20, 2024

Do keep in mind that any source that can generate a static site will work great with GitHub Pages, as you've mentioned. Likewise, you should be able to write your own custom Actions workflows that deploy to Pages for any such system regardless of if we offer an official starter workflow for it. ๐Ÿ˜Š

The friction on our side is that every new official Pages starter workflow requires additional maintenance burden internally to detect, suggest, support, and verify against regressions, so it's not as simple as just adding another workflow template here.

We definitely encourage thriving communities to create custom workflows for deploying to Pages and offer them up in their own documentation or starter project scaffolding. ๐Ÿ‘๐Ÿป

from configure-pages.

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.