Skip to content

Commit a9e9ee5

Browse files
committed
docs: Uncomment logic responsible for pushing changes to S3.(#1239)
1 parent 85200be commit a9e9ee5

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed

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

+29-31
Original file line numberDiff line numberDiff line change
@@ -78,27 +78,26 @@ jobs:
7878
run: |
7979
cp -r api site/
8080
81-
## Uncomment to deploy to s3
82-
# - name: Deploy Docs (Version)
83-
# env:
84-
# VERSION: ${{ inputs.version }}
85-
# ALIAS: ${{ inputs.alias }}
86-
# run: |
87-
# aws s3 sync \
88-
# site/ \
89-
# s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/${{ env.VERSION }}/
90-
# - name: Deploy Docs (Alias)
91-
# env:
92-
# VERSION: ${{ inputs.version }}
93-
# ALIAS: ${{ inputs.alias }}
94-
# run: |
95-
# aws s3 sync \
96-
# site/ \
97-
# s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/${{ env.ALIAS }}/
98-
# - name: Deploy Docs (Version JSON)
99-
# env:
100-
# VERSION: ${{ inputs.version }}
101-
# ALIAS: ${{ inputs.alias }}
81+
- name: Deploy Docs (Version)
82+
env:
83+
VERSION: ${{ inputs.version }}
84+
ALIAS: ${{ inputs.alias }}
85+
run: |
86+
aws s3 sync \
87+
site/ \
88+
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/${{ env.VERSION }}/
89+
- name: Deploy Docs (Alias)
90+
env:
91+
VERSION: ${{ inputs.version }}
92+
ALIAS: ${{ inputs.alias }}
93+
run: |
94+
aws s3 sync \
95+
site/ \
96+
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/${{ env.ALIAS }}/
97+
- name: Deploy Docs (Version JSON)
98+
env:
99+
VERSION: ${{ inputs.version }}
100+
ALIAS: ${{ inputs.alias }}
102101

103102

104103
# We originally used "mike" from PyPi to manage versions for us, but since we moved to S3, we can't use it to manage versions any more.
@@ -114,13 +113,12 @@ jobs:
114113
# - if it's a new version number, we add it at position 0 in the array.
115114
# 4. Once done, we'll upload it back to S3.
116115

117-
## Uncomment to deploy to s3
118-
# run: |
119-
# aws s3 cp \
120-
# s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/versions.json \
121-
# versions_old.json
122-
# jq 'del(.[].aliases[] | select(. == "${{ env.ALIAS }}"))' < versions_old.json > versions_proc.json
123-
# jq '. as $o | [{"title": "${{ env.VERSION }}", "version": "${{ env.VERSION }}", "aliases": ["${{env.ALIAS}}"] }] as $n | $n | if .[0].title | test("[a-z]+") or any($o[].title == "${{ env.VERSION }}";.) then $o else $n + $o end' < versions_proc.json > versions.json
124-
# aws s3 cp \
125-
# versions.json \
126-
# s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/versions.json
116+
run: |
117+
aws s3 cp \
118+
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/versions.json \
119+
versions_old.json
120+
jq 'del(.[].aliases[] | select(. == "${{ env.ALIAS }}"))' < versions_old.json > versions_proc.json
121+
jq '. as $o | [{"title": "${{ env.VERSION }}", "version": "${{ env.VERSION }}", "aliases": ["${{env.ALIAS}}"] }] as $n | $n | if .[0].title | test("[a-z]+") or any($o[].title == "${{ env.VERSION }}";.) then $o else $n + $o end' < versions_proc.json > versions.json
122+
aws s3 cp \
123+
versions.json \
124+
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/versions.json

0 commit comments

Comments
 (0)