fix: comment actions #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # name: Test CloudFront Invalidation | |
| # on: | |
| # workflow_dispatch: # Manual trigger | |
| # jobs: | |
| # test-invalidation: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Install awscurl | |
| # run: | | |
| # pip install awscurl | |
| # - name: Invalidate CloudFront cache via awscurl | |
| # run: | | |
| # XML_PAYLOAD=$(cat <<EOF | |
| # <InvalidationBatch xmlns="http://cloudfront.amazonaws.com/doc/2020-05-31/"> | |
| # <Paths> | |
| # <Quantity>1</Quantity> | |
| # <Items> | |
| # <Path>/*</Path> | |
| # </Items> | |
| # </Paths> | |
| # <CallerReference>$(date +%s)</CallerReference> | |
| # </InvalidationBatch> | |
| # EOF | |
| # ) | |
| # echo "Creating CloudFront invalidation..." | |
| # RESPONSE=$(awscurl --service cloudfront \ | |
| # --region us-east-1 \ | |
| # --access_key ${{ secrets.AWS_ACCESS_KEY_ID_CLOUDFRONT_INVALIDATE }} \ | |
| # --secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY_CLOUDFRONT_INVALIDATE }} \ | |
| # --header "Content-Type: text/xml" \ | |
| # --data "$XML_PAYLOAD" \ | |
| # --request POST \ | |
| # https://cloudfront.amazonaws.com/2020-05-31/distribution/${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}/invalidation) | |
| # echo "Response:" | |
| # echo "$RESPONSE" |