Skip to content

Commit 8b5c60f

Browse files
authored
chore(docs): Fix docs upload to s3 (#1494)
1 parent a91df31 commit 8b5c60f

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

.github/workflows/on_doc_merge.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ jobs:
1414
contents: write
1515
pages: write
1616
id-token: write
17+
secrets: inherit
1718
uses: ./.github/workflows/reusable-publish-docs.yml
1819
with:
1920
version: main
20-
alias: stage
21-
secrets:
22-
AWS_DOCS_ROLE_ARN: ${{ secrets.AWS_DOCS_ROLE_ARN }}
23-
AWS_DOCS_BUCKET: ${{ secrets.AWS_DOCS_BUCKET }}
21+
alias: stage

.github/workflows/publish_layer.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
contents: write
109109
pages: write
110110
id-token: write
111+
secrets: inherit
111112
uses: ./.github/workflows/reusable-publish-docs.yml
112113
with:
113114
version: ${{ inputs.latest_published_version }}

.github/workflows/rebuild-latest-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
contents: write
2020
pages: write
2121
id-token: write
22+
secrets: inherit
2223
uses: ./.github/workflows/reusable-publish-docs.yml
2324
with:
2425
version: ${{ inputs.latest_published_version }}

.github/workflows/reusable-publish-docs.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,27 @@ jobs:
9999
github_token: ${{ secrets.GITHUB_TOKEN }}
100100
publish_dir: ./api
101101
keep_files: true
102-
destination_dir: latest/api
102+
destination_dir: latest/api
103+
- name: Configure AWS credentials
104+
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0
105+
with:
106+
aws-region: us-east-1
107+
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
108+
- name: Copy API Docs
109+
run: |
110+
cp -r api site/
111+
- name: Deploy Docs (Version)
112+
env:
113+
VERSION: ${{ inputs.version }}
114+
ALIAS: ${{ inputs.alias }}
115+
run: |
116+
aws s3 sync \
117+
site/ \
118+
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-typescript/${{ env.VERSION }}/
119+
- name: Deploy Docs (Alias)
120+
env:
121+
VERSION: ${{ inputs.version }}
122+
ALIAS: ${{ inputs.alias }}
123+
run: |
124+
aws s3 sync \
125+
site/ \

0 commit comments

Comments
 (0)