ashmrtn b086f8c3ff
Use new client created for PnP ops in purge script (#5442)
PowerShell switched to requiring certificate credentials so the existing cleanup jobs have been failing since the switch

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Test Plan

- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2024-09-17 23:08:14 +00:00

47 lines
1.2 KiB
YAML

name: Publish Website
description: Publish website artifacts.
inputs:
aws-iam-role:
description: IAM role for connecting to AWS
bucket:
description: Bucket to push the website files
cfid:
description: Cloudfront ID for invalidation
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@master
name: Download website from build step
with:
name: website
path: website/build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ inputs.aws-iam-role }}
role-session-name: integration-testing
aws-region: us-east-1
- name: Add rotbots.txt
if: github.ref == 'refs/heads/asset-validation-explore'
working-directory: website
shell: bash
run: |
printf 'User-agent: *\nDisallow: /' > build/robots.txt
- name: Push website
working-directory: website
shell: bash
run: |
aws s3 sync build "s3://${{ inputs.bucket }}" --delete
- name: Invalidate cloudfront
working-directory: website
shell: bash
run: |
aws cloudfront create-invalidation --distribution-id ${{ inputs.cfid }} --paths "/*"