diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d65e3fc..521001cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,15 +46,6 @@ jobs: id-token: write # if: github.ref == 'refs/heads/main' steps: - - name: Retrieve Parameters - ssm parameter store - id: getParameters - run: | - # Replace '--path' with your specific path from Parameter Store - bucket=$(aws ssm get-parameter --name "/core/aodn-portal-v2/dev-bucket" --query 'Parameter.Value' --output text) - distribution_id=$(aws ssm get-parameter --name "/core/aodn-portal-v2/dev-cloudfront-distribution-id" --query 'Parameter.Value' --output text) - echo "BUCKET=$bucket" >> "$GITHUB_ENV" - echo "DISTRIBUTION_ID=$distribution_id" >> "$GITHUB_ENV" - - uses: actions/download-artifact@v4 with: name: build @@ -66,6 +57,15 @@ jobs: aws-region: ap-southeast-2 role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} role-session-name: GitHub_to_AWS_via_FederatedOIDC_AODNPRTALV2 + + - name: Retrieve Parameters - ssm parameter store + id: getParameters + run: | + # Replace '--path' with your specific path from Parameter Store + bucket=$(aws ssm get-parameter --name "/core/aodn-portal-v2/dev-bucket" --query 'Parameter.Value' --output text) + distribution_id=$(aws ssm get-parameter --name "/core/aodn-portal-v2/dev-cloudfront-distribution-id" --query 'Parameter.Value' --output text) + echo "BUCKET=$bucket" >> "$GITHUB_ENV" + echo "DISTRIBUTION_ID=$distribution_id" >> "$GITHUB_ENV" - name: Copy files to the production website with the AWS CLI run: |