Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cowFi-tokens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Cron: cow.fi tokens list'

on:
schedule:
- cron: '0 */3 * * *'
- cron: '0 */3 * * *' # Every 3 hours

# Required for authenticating with AWS IAM
permissions:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/s3Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Deploy to S3
on:
release:
types: [created]
workflow_run:
workflows: ["Update Permit Info"]
types:
- completed
# Allow manual trigger
workflow_dispatch:

# Required for authenticating with AWS IAM
permissions:
Expand All @@ -28,11 +34,12 @@ jobs:
- name: Upload to S3
run: |
aws s3 cp src/public/CowSwap.json s3://files.cow.fi/tokens/CowSwap.json
aws s3 sync src/public s3://files.cow.fi/token-lists

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing to make sure it works as expected, if files need to be removed, then the --delete flag could be set. Should probably do a dry-run first.


- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation \
--distribution-id $DIST_ID \
--paths "/tokens/*"
--paths "/tokens/*" "/token-lists/*"
env:
DIST_ID: ${{ secrets.DISTRIBUTION }}