Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Conversation

kozub
Copy link
Contributor

@kozub kozub commented Aug 16, 2023

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.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (bca90c9) 78.57% compared to head (9100859) 78.57%.

❗ 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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@scottgerring scottgerring left a 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
Copy link
Contributor

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

Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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
Copy link
Contributor

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!

Copy link
Contributor Author

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
Copy link
Contributor Author

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".

Copy link
Contributor

@scottgerring scottgerring Aug 21, 2023

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 🧐

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

@scottgerring scottgerring linked an issue Aug 30, 2023 that may be closed by this pull request
2 tasks
@scottgerring
Copy link
Contributor

Let's close this for now and loop back when we have capacity @kozub and @sthulb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: Version the documentation
3 participants