-
Notifications
You must be signed in to change notification settings - Fork 90
docs: Add support for docs versioning (#1239) #1370
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
Conversation
Kudos, SonarCloud Quality Gate passed! |
Codecov ReportPatch and project coverage have no change.
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #1370 +/- ##
=========================================
Coverage 78.57% 78.57%
Complexity 651 651
=========================================
Files 74 74
Lines 2506 2506
Branches 259 259
=========================================
Hits 1969 1969
Misses 455 455
Partials 82 82 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there I think! Wondering if we need to keep the gh-pages cruft.
jobs: | ||
release-docs: | ||
permissions: | ||
contents: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not doing github pages anymore, right? So we can drop pages
. I don't believe we're pushing docs back to the repo either, so we can drop contents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on gh-pages - probably we need contents
but not pages
?
type: boolean | ||
|
||
permissions: | ||
contents: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above - I don't think we need contents
or pages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on gh-pages
- probably we need contents
but not pages
?
# PROCESS | ||
# | ||
# 1. Build User Guide and API docs | ||
# 2. Publish to GitHub Pages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it just describes steps of the process which is done here (except "and API docs" which can be removed). I think it might be helpful to understand what we do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step "# 2. Publish to GitHub Pages" - we don't need this anymore, do we - maybe it becomes "push versioned docs to gh-pages branch" or something?
@@ -13,16 +13,11 @@ nav: | |||
- Utilities: | |||
- utilities/idempotency.md | |||
- utilities/parameters.md | |||
- utilities/large_messages.md | |||
- utilities/sqs_large_message_handling.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes need to be rolled back - from L16-L25. We released new modules and changed the doc structure after you forked!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I will rebase it onto current main.
secrets: inherit | ||
uses: ./.github/workflows/reusable-publish-docs.yml | ||
with: | ||
version: main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just found that version here is hardcoded. I need to check how it use here released version instead of "main".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at reusable-publish-docs.yml
, it seems like it should be the actual version alias, not a git ref? It looks like it is dropping the files into there in S3 and using it for the version label 🧐
powertools-lambda-java/.github/workflows/reusable-publish-docs.yml
Lines 79 to 86 in 9100859
run: | | |
aws s3 sync \ | |
site/ \ | |
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/${{ env.VERSION }}/ | |
- name: Deploy Docs (Alias) | |
env: | |
VERSION: ${{ inputs.version }} | |
ALIAS: ${{ inputs.alias }} |
I think we can use github.ref_name
-->
https://docs.github.com/en/actions/learn-github-actions/contexts
Issue #, if available:
#1239
Description of changes:
Add support for docs versioning and publishing docs to S3 with version.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.