Skip to content

feat: deploy pages with CI#844

Open
Gara-Dorta wants to merge 1 commit into
bbernhard:masterfrom
Gara-Dorta:deploy-pages
Open

feat: deploy pages with CI#844
Gara-Dorta wants to merge 1 commit into
bbernhard:masterfrom
Gara-Dorta:deploy-pages

Conversation

@Gara-Dorta
Copy link
Copy Markdown
Contributor

This PR builds the docs on each release via a CI workflow. This has a few advantages over the current approach:

  1. The build process is faster because the pages artifact only includes the index.html and the swagger.json instead of the whole repository
  2. The pages only contain the changes from the latest release instead of whatever is currently in master
  3. The dynamic version setting that I did in Set docs version dynamically. #830 only works for local deployments of the page. If you go to https://bbernhard.github.io/signal-cli-rest-api/ it still shows version 1.0. The approach in this PR modifies the version in the swagger.json so that it is updated also in the github pages.

You will have to change the settings for this work. So in Settings -> Pages -> Build and deployment -> Source change it from Deploy from branch to Github actions.

When testing this github was a bit funny about it. You might need to manually unpublish and republish the page when doing the switch.

Here is the workflow running on my fork https://github.com/Gara-Dorta/signal-cli-rest-api/actions/runs/25430692982
Here is the generated page https://gara-dorta.github.io/signal-cli-rest-api/

Co-authored-by: Copilot <copilot@github.com>
@Gara-Dorta
Copy link
Copy Markdown
Contributor Author

FYI, I also tried to update the version dynamically using the current approach in master. I got it almost working here master...Gara-Dorta:signal-cli-rest-api:swagger-docs-version However, the link to the swagger.json ends up as blob:none:<very long random string> due to the URL.createObjectURL call. While using spec: instead of url: leads to not having any file at all. So that's why I think that deploying via CI is the best option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant