Skip to content

chore(docs): Fix docs upload to s3 #1494

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

Merged
merged 1 commit into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/on_doc_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ jobs:
contents: write
pages: write
id-token: write
secrets: inherit
uses: ./.github/workflows/reusable-publish-docs.yml
with:
version: main
alias: stage
secrets:
AWS_DOCS_ROLE_ARN: ${{ secrets.AWS_DOCS_ROLE_ARN }}
AWS_DOCS_BUCKET: ${{ secrets.AWS_DOCS_BUCKET }}
alias: stage
1 change: 1 addition & 0 deletions .github/workflows/publish_layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
contents: write
pages: write
id-token: write
secrets: inherit
uses: ./.github/workflows/reusable-publish-docs.yml
with:
version: ${{ inputs.latest_published_version }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rebuild-latest-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
contents: write
pages: write
id-token: write
secrets: inherit
uses: ./.github/workflows/reusable-publish-docs.yml
with:
version: ${{ inputs.latest_published_version }}
Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/reusable-publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,27 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./api
keep_files: true
destination_dir: latest/api
destination_dir: latest/api
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
- name: Copy API Docs
run: |
cp -r api site/
- name: Deploy Docs (Version)
env:
VERSION: ${{ inputs.version }}
ALIAS: ${{ inputs.alias }}
run: |
aws s3 sync \
site/ \
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-typescript/${{ env.VERSION }}/
- name: Deploy Docs (Alias)
env:
VERSION: ${{ inputs.version }}
ALIAS: ${{ inputs.alias }}
run: |
aws s3 sync \
site/ \