-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publishing to gh-pages #429
Comments
OK, wait... this is a mystery... so first i noticed that right now, neither https://github.com/stefq2/infragram/tree/gh-pages and https://github.com/stephaniequintana/infragram/tree/gh-pages have the latest commits (like json changes). So I'm just referencing my own published gh-pages at https://jywarren.github.io/infragram/ So the mystery is - https://jywarren.github.io/infragram/index2.html doesn't load node_modules - for example it shows an error for However, https://jywarren.github.io/infragram/ DOES WORK 😱 and does load node_modules -- even after i hard refreshed and cleared cache, and checked https://github.com/jywarren/infragram/settings/pages, so it's not a mistake. The bootstrap file loaded fine for example: https://jywarren.github.io/infragram/node_modules/bootstrap/dist/js/bootstrap.min.js OK, so I'm just looking closer... i had assumed we had an issue affecting all node_modules, but actually... the only two errors I see are:
So I think i had just assumed wrong. The issue is that bootstrap5, added via package.json, wasn't actually added into the gh-pages branch. We need to manually add it since the node_modules folder is ignored (see $ git add -f node_modules # actually just add/remove ALL updates to this directory
$ git commit -m 'adding bootstrap 5 files' This extra commit will exist only on the gh-pages branch, because that's the only place we need to host external npm includes like bootstrap. All other places will rely on What about infragram2.js? Oh, actually i see it wasn't included in b43a0f4 - in #426. So @stephaniequintana i think you need to add that in a new PR, sorry we missed that! |
OK, now watching https://github.com/jywarren/infragram/settings/pages and it's blue... and on refresh it's green and all published. And it works!!! https://jywarren.github.io/infragram/index2.html OK, so you can follow the steps above if you like, OR you can just Sorry for missing the step of force-adding your node modules folder to gh-pages! It's been a while since I did this!!! It's also super exciting to see this working now!!!! Great work!! |
Thank you, @jywarren I took the shortcut you offered above and reset then pulled from your gh-pages branch. Although each time I switch the :root branch it takes a while to turn from blue to green, neither are building correctly. I went through each step, but must cannot discern what I've missed - I'm hoping since it's fresh on your mind you may be able to (?) |
Hmm, are you building it from the gh-pages branch? That's the branch with
the modules, so it should be the root.
…On Sat, Jul 2, 2022, 3:43 PM Stephanie Quintana ***@***.***> wrote:
Thank you, @jywarren <https://github.com/jywarren>
I took the shortcut you offered above and reset then pulled from your
gh-pages branch.
My own gh-pages branch now points to the same commit as yours and
bootstrap 5 is listed in the node modules folder, but the neither the main
nor the v2_functions_connect branch are loading the modules for
https://stephaniequintana.github.io/infragram/ or for
https://stephaniequintana.github.io/infragram/index2.html
Although each time I switch the :root branch it takes a while to turn from
blue to green, neither are building correctly. I went through each step,
but must cannot discern what I've missed - I'm hoping since it's fresh on
your mind you may be able to (?)
—
Reply to this email directly, view it on GitHub
<#429 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J4NLZDQINAAXWCJK2DVSA2P7ANCNFSM52OX3XSA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes that's right! GitHub pages is weird but the trigger to build is
supposed to be pushing to the selected branch; the ability to choose the
root is supposed to be just a configuration you do once and leave as is.
Choose gh-pages as the source!
…On Sat, Jul 2, 2022, 3:54 PM Stephanie Quintana ***@***.***> wrote:
By :root, I'm referring to:
[image: Screen Shot 2022-07-02 at 7 49 50 AM]
<https://user-images.githubusercontent.com/81270711/177001528-03ab8e6b-6904-46ed-8858-85cdf5587fc3.png>
Here, I've always selected the branch I want published and assumed that
the gh-pages branch was reference for the build.
Is this what you mean, that I need to change this :root to the gh-pages
branch? Curious.
—
Reply to this email directly, view it on GitHub
<#429 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J6EX5MLIYUZ4NIQHMDVSA3XLANCNFSM52OX3XSA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Then, what is built and served is the gh-pages branch itself.
…On Sat, Jul 2, 2022, 4:01 PM Jeffrey Yoo Warren ***@***.***> wrote:
Yes that's right! GitHub pages is weird but the trigger to build is
supposed to be pushing to the selected branch; the ability to choose the
root is supposed to be just a configuration you do once and leave as is.
Choose gh-pages as the source!
On Sat, Jul 2, 2022, 3:54 PM Stephanie Quintana ***@***.***>
wrote:
> By :root, I'm referring to:
>
> [image: Screen Shot 2022-07-02 at 7 49 50 AM]
> <https://user-images.githubusercontent.com/81270711/177001528-03ab8e6b-6904-46ed-8858-85cdf5587fc3.png>
>
> Here, I've always selected the branch I want published and assumed that
> the gh-pages branch was reference for the build.
>
> Is this what you mean, that I need to change this :root to the gh-pages
> branch? Curious.
>
> —
> Reply to this email directly, view it on GitHub
> <#429 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAF6J6EX5MLIYUZ4NIQHMDVSA3XLANCNFSM52OX3XSA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Ok. WOW! That worked... odd. Now I'm just confused about how I show/build/display a specific branch. RN it's building the main branch, but how do I share the changes from another branch, like my v2_functions_connect branch? Again, in the past this is where I referenced the branch I wanted built... |
Wait, why is it building the main branch?
Well, you can push new commits on top of the gh-pages branch, and sometimes
you need to rewind it first if there are conflicts. I think maybe it'll be
useful to try to talk through the mental model for how this works, maybe on
our Tuesday call? It's a weird system so seeing what it does step by step
from what your branches look like will help!
…On Sat, Jul 2, 2022, 4:06 PM Stephanie Quintana ***@***.***> wrote:
Ok. WOW! That worked... odd.
Now I'm just confused about how I show/build/display a specific branch. RN
it's building the main branch, but how do I share the changes from another
branch, like my v2_functions_connect branch? Again, in the past this is
where I referenced the branch I wanted built...
—
Reply to this email directly, view it on GitHub
<#429 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J3BISIODNL36VS2AXTVSA5E5ANCNFSM52OX3XSA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I haven't done that in the past, but it makes perfect sense. Again: curious. edit:
I misspoke. It's building the gh-pages branch which are referencing the same files that are in the main branch (I assume b/c before I pulled from your gh-pages branch you had merged with main(?)). At any rate, I do understand what is happening now - pretty sure of that 😄 |
In general I leave the root pointed at gh-pages, the default, and to
republish I just push new commits to gh-pages, which triggers republishing.
…On Sat, Jul 2, 2022, 3:46 PM Jeffrey Yoo Warren ***@***.***> wrote:
Hmm, are you building it from the gh-pages branch? That's the branch with
the modules, so it should be the root.
On Sat, Jul 2, 2022, 3:43 PM Stephanie Quintana ***@***.***>
wrote:
> Thank you, @jywarren <https://github.com/jywarren>
>
> I took the shortcut you offered above and reset then pulled from your
> gh-pages branch.
> My own gh-pages branch now points to the same commit as yours and
> bootstrap 5 is listed in the node modules folder, but the neither the main
> nor the v2_functions_connect branch are loading the modules for
> https://stephaniequintana.github.io/infragram/ or for
> https://stephaniequintana.github.io/infragram/index2.html
>
> Although each time I switch the :root branch it takes a while to turn
> from blue to green, neither are building correctly. I went through each
> step, but must cannot discern what I've missed - I'm hoping since it's
> fresh on your mind you may be able to (?)
>
> —
> Reply to this email directly, view it on GitHub
> <#429 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAF6J4NLZDQINAAXWCJK2DVSA2P7ANCNFSM52OX3XSA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Hi @stephaniequintana i'm documenting my steps here. I started in my own fork, https://github.com/jywarren/infragram/, and aiming to publish the latest https://github.com/publiclab/infragram/ main branch, and i'll comment the lines below to explain as I go.
OK, so now I think i'm in the same position you were -- https://jywarren.github.io/infragram/index2.html doesn't load any of the
node_modules
folder.The text was updated successfully, but these errors were encountered: