Skip to content

Commit dc1aed3

Browse files
authored
PYCO-37: Publish API docs to S3 (#38)
Changes ======= * Update publish.yml to upload API docs to S3
1 parent 3369f83 commit dc1aed3

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,14 @@ jobs:
343343
name: Publish SDK API docs
344344
needs: [upload-api-docs, validate-pypi]
345345
environment: publish
346-
# permissions:
347-
# id-token: write
348-
# contents: read
346+
permissions:
347+
id-token: write
348+
contents: read
349349
if: |
350350
always()
351351
&& (needs.build-wheels.result == 'success' || needs.build-wheels.result == 'skipped')
352352
&& (needs.tests.result == 'success' || needs.tests.result == 'skipped')
353+
&& (needs.validate-pypi.result == 'success' || needs.validate-pypi.result == 'skipped')
353354
&& needs.output-publish-params.result == 'success'
354355
&& needs.output-publish-params.outputs.publish_api_docs == 'true'
355356
runs-on: ubuntu-22.04
@@ -358,16 +359,14 @@ jobs:
358359
uses: actions/download-artifact@v4
359360
with:
360361
name: pycbcc-api-docs
361-
# - name: Setup AWS Credentials
362-
# uses: aws-actions/configure-aws-credentials@v3
363-
# with:
364-
# role-to-assume: arn:aws:iam::786014483886:role/SDK_GHA
365-
# aws-region: us-west-1
362+
- name: Setup AWS Credentials
363+
uses: aws-actions/configure-aws-credentials@v3
364+
with:
365+
role-to-assume: arn:aws:iam::786014483886:role/SDK_GHA
366+
aws-region: us-west-1
366367
- name: Upload API docs to S3
367368
run: |
368369
ls -alh ./html
369-
export S3_URL="s3://docs.couchbase.com/sdk-api/columnar-python-client-$SDK_VERSION/"
370-
echo "publish command: aws s3 cp ./html $S3_URL --recursive --acl public-read"
371-
# aws s3 cp ./html s3://docs.couchbase.com/sdk-api/columnar-python-client-$SDK_VERSION/ --recursive --acl public-read
370+
aws s3 cp ./html s3://docs.couchbase.com/sdk-api/columnar-python-client-$SDK_VERSION/ --recursive --acl public-read
372371
env:
373372
SDK_VERSION: ${{ inputs.version }}

0 commit comments

Comments
 (0)