From 7f0756df3916d45c87758ce1474759abf9c07172 Mon Sep 17 00:00:00 2001 From: retroboy Date: Fri, 1 Mar 2024 09:05:01 +0100 Subject: [PATCH] added rewards workflow --- .github/workflows/jediswap-rewards.yml | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/jediswap-rewards.yml diff --git a/.github/workflows/jediswap-rewards.yml b/.github/workflows/jediswap-rewards.yml new file mode 100644 index 0000000..db26e37 --- /dev/null +++ b/.github/workflows/jediswap-rewards.yml @@ -0,0 +1,43 @@ +name: Release - Rewards + +on: + workflow_dispatch: + inputs: + +jobs: + build: + runs-on: ubuntu-latest + environment: + name: rewards + url: https://rewards.jediswap.xyz + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'yarn' + + - name: Install dependencies + run: yarn install --immutable + + - name: Build Project + run: CI=false yarn build + + - name: Configure AWS + 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: us-east-1 + - name: Deploy app build to S3 bucket + run: aws s3 sync ./build/ s3://$BUCKET_NAME + env: + BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} + + - name: Run Cache Invalidation + run: aws cloudfront create-invalidation --distribution-id $CDN_DISTRIBUTION_ID --paths /\* + env: + CDN_DISTRIBUTION_ID: ${{ secrets.AWS_CDN_DISTRIBUTION_ID }} \ No newline at end of file