Skip to content

updated name and strucutre #16

updated name and strucutre

updated name and strucutre #16

Workflow file for this run

name: CI/CD
on:
push:
tags:
- 'v*'
env:
AWS_REGION: us-east-1
jobs:
push-image:
name: Push,Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Push static to Prod S3 CDN
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-prod')
env:
CDN_DIR: shibarium-tokens
BUCKET: "s3://${{ secrets.AWS_S3_BUCKET_CDN_PROD }}"
DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DIST_ID_PROD }}
run: |
aws s3 cp assets/ $BUCKET/$CDN_DIR/ --recursive
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/$CDN_DIR/*"