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

Protocol notes don't actually deploy multiple versions #6

Closed
hdevalence opened this issue Sep 1, 2021 · 2 comments
Closed

Protocol notes don't actually deploy multiple versions #6

hdevalence opened this issue Sep 1, 2021 · 2 comments
Labels
A-tooling Area: developer tooling for building Penumbra itself C-bug Category: a bug E-medium Effort: Medium

Comments

@hdevalence
Copy link
Member

#5 changes the protocol notes so that there's a version field included in the URL paths. This way, in the future, there can be a separately-rendered set of docs for each tag or branch.

However, the current deploy pipeline uses the firebase cli, which only does atomic deployments, so there's no way to add a set of files to the existing site, and this means that only the most recently deployed version will actually appear. At the moment this isn't a big deal because there's just one version anyways.

@hdevalence hdevalence added C-bug Category: a bug E-easy Effort: Easy S-active A-tooling Area: developer tooling for building Penumbra itself E-medium Effort: Medium and removed E-easy Effort: Easy S-active labels Sep 7, 2021
@hdevalence
Copy link
Member Author

A setup that would be really useful for development would be:

  • on pushes to branch branch, deploy notes to protocol.penumbra.zone/branch/..., removing any previous contents of /branch/...;
  • on pushes of tag tag, deploy notes to protocol.penumbra.zone/tag/..., removing any previous contents of /tag/...;
  • when a branch branch is deleted, remove everything under protocol.penumbra.zone/branch/...;

This way, it would be possible to preview notes or API documentation of in-progress work.

I think this should be possible with Github Actions, but it might require changes to the hosting in order to be able to make partial updates and deletions, since the firebase cli only performs atomic updates. S3+Cloudfront or something would probably work just as well.

@hdevalence
Copy link
Member Author

We haven't done this in the last year and a half and things have worked out, so we can probably skip it.

conorsch added a commit that referenced this issue May 1, 2024
Modifies the firebase hosting config to remove the `/<version>/`
prefix from the guide URLs, which has only ever been `/main/`, due to #6.
Also includes rewrites so that historical URLs with the `/main/` prefix
will still be honored, and redirected to the appropriate location that's
live in the docs.

Squirreling away this one-liner for generating a "sitemap" of all URLs:

    curl -s http://localhost:5000 \
        | rg -i 'class="chapter"' \
        | perl -npE 's/href=/\nhref=/g ' \
        | perl -nE  '/href="([\w.\/]+)"/g and say $1' > sitemap.txt

which was helpful in creating the redirects.

Removes the mdboook-only meta-refresh redirects added in #4232,
because the browser UX was atrocious. Refs #3417.
hdevalence pushed a commit that referenced this issue May 6, 2024
Modifies the firebase hosting config to remove the `/<version>/`
prefix from the guide URLs, which has only ever been `/main/`, due to #6.
Also includes rewrites so that historical URLs with the `/main/` prefix
will still be honored, and redirected to the appropriate location that's
live in the docs.

Squirreling away this one-liner for generating a "sitemap" of all URLs:

    curl -s http://localhost:5000 \
        | rg -i 'class="chapter"' \
        | perl -npE 's/href=/\nhref=/g ' \
        | perl -nE  '/href="([\w.\/]+)"/g and say $1' > sitemap.txt

which was helpful in creating the redirects.

Removes the mdboook-only meta-refresh redirects added in #4232,
because the browser UX was atrocious. Refs #3417.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tooling Area: developer tooling for building Penumbra itself C-bug Category: a bug E-medium Effort: Medium
Projects
None yet
Development

No branches or pull requests

1 participant