Skip to content
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

Build Tooling: Bring back Storybook deploy to GitHub pages #21669

Closed
gziolo opened this issue Apr 17, 2020 · 10 comments · Fixed by #22443
Closed

Build Tooling: Bring back Storybook deploy to GitHub pages #21669

gziolo opened this issue Apr 17, 2020 · 10 comments · Fixed by #22443
Assignees
Labels
[Status] In Progress Tracking issues with work in progress Storybook Storybook and its stories for components [Type] Build Tooling Issues or PRs related to build tooling

Comments

@gziolo
Copy link
Member

gziolo commented Apr 17, 2020

Is your feature request related to a problem? Please describe.

Related commit from @aduth:
edc4ac6#diff-354f30a63fb0907d4ad57269548329e3

GITHUB_TOKEN is suspected cause of recent build failures if invalid. This is the only known usage. Plan is to remove this build stage, then remove the configured token from settings.

It's been over 3 weeks since we don't update https://wordpress.github.io/gutenberg/.

Describe the solution you'd like

Bring back integration to make it easy to explore available components or play with the block editor in isolation.

@gziolo gziolo added [Type] Build Tooling Issues or PRs related to build tooling Storybook Storybook and its stories for components labels Apr 17, 2020
@aduth aduth self-assigned this Apr 17, 2020
@aduth
Copy link
Member

aduth commented Apr 17, 2020

@youknowriad Do you recall the permission scopes necessary for the token?

@youknowriad
Copy link
Contributor

@aduth
Copy link
Member

aduth commented Apr 17, 2020

Hm, I might try to look briefly into whether this would be easy enough to set up using GitHub Actions. I have a feeling it would be, and might have some advantages:

  • Action secrets are maintained as settings of the repository, not by an individual user. The latter has an additional downside of not being repository-specific. I don't love the idea of tokens floating around that give access to all of my repositories.
  • A GitHub Action to maintain GitHub Pages? Seems a "good fit", though I guess practically speaking there's probably not a whole lot of difference.

@youknowriad
Copy link
Contributor

I'm almost certain you'd find some pre-made Github or community actions to do that

@youknowriad
Copy link
Contributor

@aduth
Copy link
Member

aduth commented Apr 17, 2020

Oh yes, I didn't plan to do anything custom.

@aduth
Copy link
Member

aduth commented Apr 17, 2020

This limitation appears both frustrating and blocking a direct use of the GitHub action:

https://github.com/marketplace/actions/github-pages#limitation

Related: https://git.luolix.topmunity/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/m-p/26869

The GITHUB_TOKEN that is provided as a part of GitHub Actions doesn't have authorization to create any successive events, such as GitHub Pages builds. So while you can push to the gh-pages branch using the GITHUB_TOKEN, it won't spawn a GitHub Pages build. You'll need to create a personal access token and supply it to your GitHub Action as a secret.

I'm not personally comfortable to create a personal access token for this purpose. If someone else would like to, or if we can create a new custom user with access only to this repository, it may be fine as alternative.

@gziolo
Copy link
Member Author

gziolo commented Apr 19, 2020

There is also https://github.com/marketplace/actions/github-pages-action:

Notes: Actually, the GITHUB_TOKEN works for deploying to GitHub Pages but it has still some limitations. For the first deployment, we need to select the gh-pages branch or master branch on the repository settings tab.

@aduth
Copy link
Member

aduth commented Apr 21, 2020

The wording is a bit confusing to me. If it's of the sort of "set up once and done", it'd be fine. It's contrary to what I would expect based on the previous support conversation, which seems to imply that the token fails to trigger a pages build, where builds are per-commit and thus still relevant even after a first deployment. I guess it wouldn't hurt to try.

@aduth
Copy link
Member

aduth commented May 18, 2020

Experimenting with the aforementioned action at #22443.

@aduth aduth closed this as completed May 18, 2020
@aduth aduth reopened this May 18, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress Storybook Storybook and its stories for components [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants