-
Notifications
You must be signed in to change notification settings - Fork 28
38 lines (32 loc) · 1.03 KB
/
s3Deploy.yml
File metadata and controls
38 lines (32 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy to S3
on:
release:
types: [created]
# Required for authenticating with AWS IAM
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
with:
role-to-assume: arn:aws:iam::693696263829:role/token-list-github-action-role
role-session-name: githubactionsession
aws-region: eu-central-1
- name: Upload to S3
run: |
aws s3 cp src/public/CowSwap.json s3://files.cow.fi/tokens/CowSwap.json
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation \
--distribution-id $DIST_ID \
--paths "/tokens/*"
env:
DIST_ID: ${{ secrets.DISTRIBUTION }}