diff --git a/.github/workflows/cowFi-tokens.yml b/.github/workflows/cowFi-tokens.yml index 1f96f6982..6cd65b980 100644 --- a/.github/workflows/cowFi-tokens.yml +++ b/.github/workflows/cowFi-tokens.yml @@ -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: diff --git a/.github/workflows/s3Deploy.yml b/.github/workflows/s3Deploy.yml index 413d74dc3..af6d3f4bd 100644 --- a/.github/workflows/s3Deploy.yml +++ b/.github/workflows/s3Deploy.yml @@ -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: @@ -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 - name: Invalidate CloudFront cache run: | aws cloudfront create-invalidation \ --distribution-id $DIST_ID \ - --paths "/tokens/*" + --paths "/tokens/*" "/token-lists/*" env: DIST_ID: ${{ secrets.DISTRIBUTION }}