diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml index f5f45e0..df84975 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-deploy.yml @@ -85,9 +85,9 @@ jobs: uses: reggionick/s3-deploy@v4 with: folder: dist - bucket: ${{ env.AWS_BUCKET }} + bucket: ${{ env.FALLBACK_AWS_BUCKET }} bucket-region: ${{ secrets.AWS_REGION }} - dist-id: ${{ env.CLOUDFRONT_DIST_ID }} + dist-id: ${{ env.FALBACK_CLOUDFRONT_DIST_ID }} invalidation: / delete-removed: true no-cache: true @@ -126,20 +126,15 @@ jobs: run: | git fetch --tags git checkout ${{ github.event.inputs.version }} - - - - name: Set environment variables - run: | - echo "AWS_BUCKET=${{ secrets.PROD_AWS_BUCKET }}" >> $GITHUB_ENV - echo "CLOUDFRONT_DIST_ID=${{ secrets.PROD_CLOUDFRONT_DIST_ID }}" >> $GITHUB_ENV + - name: Upload HTML to S3 uses: reggionick/s3-deploy@v4 with: folder: dist - bucket: ${{ env.AWS_BUCKET }} + bucket: ${{ env.PROD_AWS_BUCKET }} bucket-region: ${{ secrets.AWS_REGION }} - dist-id: ${{ env.CLOUDFRONT_DIST_ID }} + dist-id: ${{ env.PROD_CLOUDFRONT_DIST_ID }} invalidation: / delete-removed: true no-cache: true diff --git a/.github/workflows/qa-deploy.yml b/.github/workflows/qa-deploy.yml index 39b66a9..7f7161b 100644 --- a/.github/workflows/qa-deploy.yml +++ b/.github/workflows/qa-deploy.yml @@ -67,8 +67,8 @@ jobs: with: folder: dist bucket: orcid-qa-public-page - bucket-region: 'us-east-1' - dist-id: 'E3AOMNP9201N9Z' + bucket-region: ${{ secrets.AWS_REGION }} + dist-id: ${{secrets.QA_CLOUDFRONT_DIST_ID}} invalidation: / delete-removed: true no-cache: true @@ -77,7 +77,7 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: 'us-east-1' + AWS_REGION: '${{ secrets.AWS_REGION }} release_prod_wordpress_new_version: @@ -168,4 +168,4 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: 'us-east-1' \ No newline at end of file + AWS_REGION: ${{ secrets.AWS_REGION }} \ No newline at end of file diff --git a/wordpress-prod-release-validation.py b/wordpress-prod-release-validation.py index 3807767..fd1ab90 100644 --- a/wordpress-prod-release-validation.py +++ b/wordpress-prod-release-validation.py @@ -47,7 +47,7 @@ def validate_assets(url, version, github_writer, env): break else: if attempt < max_retries - 1: - github_writer.write_summary(f"Version {version} not found. Retrying... ({attempt + 1}/{max_retries})", env) + github_writer.write_summary(f"Version {version} not found. Retrying... ({attempt + 1}/{max_retries})") time.sleep(5) response = fetch_url(session, url) if not response: