From 19209cdc5421286b86d4904c700eaf477c2ab30b Mon Sep 17 00:00:00 2001 From: Robert Snow Date: Wed, 3 Dec 2025 08:27:26 +1100 Subject: [PATCH 1/2] fix: skip deploy for contributors (#9263) --- .circleci/config.yml | 45 +++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 78b2778ab61..b25af53686c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,19 +59,38 @@ commands: steps: - attach_workspace: at: /tmp/dist - - aws-cli/install - - aws-s3/sync: - arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --exclude * --include *.html --include *.txt --include *.json --include *.md --include *.xml - from: /tmp/dist/s2-docs/<< parameters.dir >> - to: << parameters.bucket >> - - aws-s3/sync: - arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --content-type text/x-component;charset=utf-8 --exclude * --include *.rsc - from: /tmp/dist/s2-docs/<< parameters.dir >> - to: << parameters.bucket >> - - aws-s3/sync: - arguments: --cache-control public,max-age=31536000,immutable --include * --exclude *.html --exclude *.rsc --exclude *.txt --exclude *.json --exclude *.md --exclude *.xml - from: /tmp/dist/s2-docs/<< parameters.dir >> - to: << parameters.bucket >> + - when: + condition: + and: + - not: + equal: [ "", "${AWS_ACCESS_KEY_ID}" ] + - not: + equal: [ "", "${AWS_SECRET_ACCESS_KEY}" ] + steps: + - aws-cli/install + - aws-s3/sync: + arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --exclude * --include *.html --include *.txt --include *.json --include *.md --include *.xml + from: /tmp/dist/s2-docs/<< parameters.dir >> + to: << parameters.bucket >> + - aws-s3/sync: + arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --content-type text/x-component;charset=utf-8 --exclude * --include *.rsc + from: /tmp/dist/s2-docs/<< parameters.dir >> + to: << parameters.bucket >> + - aws-s3/sync: + arguments: --cache-control public,max-age=31536000,immutable --include * --exclude *.html --exclude *.rsc --exclude *.txt --exclude *.json --exclude *.md --exclude *.xml + from: /tmp/dist/s2-docs/<< parameters.dir >> + to: << parameters.bucket >> + - unless: + condition: + and: + - not: + equal: [ "", "${AWS_ACCESS_KEY_ID}" ] + - not: + equal: [ "", "${AWS_SECRET_ACCESS_KEY}" ] + steps: + - run: + name: Skip S3 deployment + command: echo "AWS credentials not found. Skipping S3 deployment." jobs: install: From 54dc76bee02d3661419fd497de8ab39104295899 Mon Sep 17 00:00:00 2001 From: Daniel Lu Date: Tue, 2 Dec 2025 14:17:14 -0800 Subject: [PATCH 2/2] chore: skip s3 deployment on fork PRs so they pass (#9270) --- .circleci/config.yml | 52 +++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b25af53686c..f89714246df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,38 +59,26 @@ commands: steps: - attach_workspace: at: /tmp/dist - - when: - condition: - and: - - not: - equal: [ "", "${AWS_ACCESS_KEY_ID}" ] - - not: - equal: [ "", "${AWS_SECRET_ACCESS_KEY}" ] - steps: - - aws-cli/install - - aws-s3/sync: - arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --exclude * --include *.html --include *.txt --include *.json --include *.md --include *.xml - from: /tmp/dist/s2-docs/<< parameters.dir >> - to: << parameters.bucket >> - - aws-s3/sync: - arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --content-type text/x-component;charset=utf-8 --exclude * --include *.rsc - from: /tmp/dist/s2-docs/<< parameters.dir >> - to: << parameters.bucket >> - - aws-s3/sync: - arguments: --cache-control public,max-age=31536000,immutable --include * --exclude *.html --exclude *.rsc --exclude *.txt --exclude *.json --exclude *.md --exclude *.xml - from: /tmp/dist/s2-docs/<< parameters.dir >> - to: << parameters.bucket >> - - unless: - condition: - and: - - not: - equal: [ "", "${AWS_ACCESS_KEY_ID}" ] - - not: - equal: [ "", "${AWS_SECRET_ACCESS_KEY}" ] - steps: - - run: - name: Skip S3 deployment - command: echo "AWS credentials not found. Skipping S3 deployment." + - aws-cli/install + - run: + name: Check AWS credentials + command: | + if [ -z "$AWS_ACCESS_KEY_ID" ] || [ -z "$AWS_SECRET_ACCESS_KEY" ]; then + echo "AWS credentials not found" + circleci-agent step halt + fi + - aws-s3/sync: + arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --exclude * --include *.html --include *.txt --include *.json --include *.md --include *.xml + from: /tmp/dist/s2-docs/<< parameters.dir >> + to: << parameters.bucket >> + - aws-s3/sync: + arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --content-type text/x-component;charset=utf-8 --exclude * --include *.rsc + from: /tmp/dist/s2-docs/<< parameters.dir >> + to: << parameters.bucket >> + - aws-s3/sync: + arguments: --cache-control public,max-age=31536000,immutable --include * --exclude *.html --exclude *.rsc --exclude *.txt --exclude *.json --exclude *.md --exclude *.xml + from: /tmp/dist/s2-docs/<< parameters.dir >> + to: << parameters.bucket >> jobs: install: