diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index bd8a4556..dced5454 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -86,6 +86,11 @@ jobs: with: name: ui-components-build path: packages/ui-components/dist + - name: Upload 3ds build + uses: actions/upload-artifact@v4 + with: + name: 3ds-build + path: packages/3ds/dist - name: Upload react build uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/deploy-3ds.yml b/.github/workflows/deploy-3ds.yml index a9d3d5b5..bcf22cd0 100644 --- a/.github/workflows/deploy-3ds.yml +++ b/.github/workflows/deploy-3ds.yml @@ -10,18 +10,6 @@ on: description: "Name of the job" required: true type: string - vite-evervault-js-url: - description: "URL where the JS SDK should be loaded from" - required: true - type: string - vite-keys-url: - description: "URL where keys will be fetched from" - required: true - type: string - vite-api-url: - description: "API endpoint" - required: true - type: string secrets: aws-access-key-id: description: "AWS Access Key ID" @@ -40,30 +28,18 @@ jobs: runs-on: ubuntu-latest environment: ${{ inputs.environment }} name: ${{ inputs.name }} - env: - VITE_EVERVAULT_JS_URL: ${{ inputs.vite-evervault-js-url }} - VITE_KEYS_URL: ${{ inputs.vite-keys-url }} - VITE_API_URL: ${{ inputs.vite-api-url }} steps: - - name: Check out code - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - uses: pnpm/action-setup@v2 - - name: Setup Node.js environment - uses: actions/setup-node@v3 - with: - cache: "pnpm" - - name: Install Dependencies - run: pnpm install - - name: Build - run: pnpm --filter @evervault/3ds... build - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v2 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: Download Build Artifacts + uses: actions/download-artifact@v4.1.8 + with: + name: 3ds-build + path: dist - name: S3 Deploy working-directory: packages/3ds run: aws s3 cp dist s3://${{ secrets.aws-s3-bucket }}/ --recursive diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0fa9609d..ccadc8fe 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -55,18 +55,16 @@ jobs: aws-s3-bucket: ${{ secrets.UI_COMPONENTS_S3_BUCKET }} aws-cloudfront-distribution-id: ${{ secrets.UI_COMPONENTS_CLOUDFRONT_DISTRIBUTION_ID }} deploy-3ds: + needs: build uses: ./.github/workflows/deploy-3ds.yml with: environment: "staging" name: "Deploy to Staging" - vite-evervault-js-url: "https://js.evervault.io/v2" - vite-keys-url: "https://keys.evervault.io" - vite-api-url: "https://api.evervault.io" secrets: aws-access-key-id: ${{ secrets.PUBLIC_REPO_AWS_ACCESS_KEY_ID_STAGING }} aws-secret-access-key: ${{ secrets.PUBLIC_REPO_AWS_SECRET_ACCESS_KEY_STAGING }} - aws-s3-bucket: ${{ secrets.TDS_S3_BUCKET }} - aws-cloudfront-distribution-id: ${{ secrets.TDS_CLOUDFRONT_DISTRIBUTION_ID }} + aws-s3-bucket: ${{ secrets.TDS_AWS_S3_BUCKET }} + aws-cloudfront-distribution-id: ${{ secrets.TDS_AWS_CLOUDFRONT_DISTRIBUTION_ID }} release: name: Release runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e57e2167..11347daf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,6 +46,7 @@ jobs: aws-cloudfront-distribution-id: ${{ secrets.INPUTS_CLOUDFRONT_DISTRIBUTION_ID }} deploy-ui-components: if: contains(github.event.release.tag_name, '@evervault/ui-components') + needs: build uses: ./.github/workflows/deploy-ui-components.yml with: environment: "production" @@ -57,13 +58,11 @@ jobs: aws-cloudfront-distribution-id: ${{ secrets.UI_COMPONENTS_CLOUDFRONT_DISTRIBUTION_ID }} deploy-3ds: if: contains(github.event.release.tag_name, '@evervault/3ds') + needs: build uses: ./.github/workflows/deploy-3ds.yml with: environment: "production" name: "Deploy to Production" - vite-evervault-js-url: "https://js.evervault.com/v2" - vite-keys-url: "https://keys.evervault.com" - vite-api-url: "https://api.evervault.com" secrets: aws-access-key-id: ${{ secrets.PUBLIC_REPO_AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.PUBLIC_REPO_AWS_SECRET_ACCESS_KEY }}