Skip to content

Commit 04f3bf0

Browse files
authored
Merge pull request #216 from IABTechLab/xuy-UID2-6105-deployment-pipeline-update
xuy-UID2-6105-deployment-pipeline-update
2 parents 5b9d777 + f17c2c1 commit 04f3bf0

File tree

5 files changed

+49
-10
lines changed

5 files changed

+49
-10
lines changed

.github/actions/cdn_deployment_aws/action.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ inputs:
1616
aws_bucket_name:
1717
description: The AWS bucket to sync
1818
required: true
19+
deploy_index_html:
20+
description: Deploy a simple index.html file to S3 root
21+
default: 'false'
1922
runs:
2023
using: 'composite'
2124

@@ -39,6 +42,40 @@ runs:
3942
shell: bash
4043
run: aws s3 sync ./download s3://${{ inputs.aws_bucket_name }}
4144

45+
- name: Create and Deploy Index HTML
46+
if: ${{ inputs.deploy_index_html == 'true' }}
47+
shell: bash
48+
run: |
49+
echo '<!DOCTYPE html>
50+
<html lang="en">
51+
<head>
52+
<meta charset="UTF-8">
53+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
54+
<title>UID2/EUID SDK Files</title>
55+
<style>
56+
body { font-family: Arial, sans-serif; margin: 40px; }
57+
h1 { color: #333; }
58+
.file-list { margin: 20px 0; }
59+
.file-item { margin: 10px 0; padding: 10px; background: #f5f5f5; border-radius: 5px; }
60+
.file-link { text-decoration: none; color: #0066cc; font-weight: bold; }
61+
.file-link:hover { text-decoration: underline; }
62+
</style>
63+
</head>
64+
<body>
65+
<h1>UID2/EUID SDK Files</h1>
66+
<p>This directory contains the latest SDK files for UID2 and EUID integration.</p>
67+
<div class="file-list">
68+
<div class="file-item">
69+
<strong>SDK Files:</strong> Available in this directory
70+
</div>
71+
<div class="file-item">
72+
<strong>Documentation:</strong> <a href="https://unifiedid.com/docs/guides/summary-guides" target="_blank" class="file-link">Visit Documentation</a>
73+
</div>
74+
</div>
75+
</body>
76+
</html>' > index.html
77+
aws s3 cp index.html s3://${{ inputs.aws_bucket_name }}/index.html
78+
4279
- name: Invalidate CloudFront
4380
uses: chetan/invalidate-cloudfront-action@v2
4481
env:

.github/workflows/publish-package-to-cdn.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release SDK Package to NPM and CDN (v2)
1+
name: Release SDK to NPM and CDN (v2)
22
run-name: ${{ inputs.release_type == 'Snapshot' && 'Publish Pre-release' || format('Release {0}', inputs.release_type)}} SDK Package to NPM and CDN by @${{ github.actor }}
33

44
on:
@@ -128,7 +128,7 @@ jobs:
128128
runs-on: ubuntu-latest
129129
permissions:
130130
id-token: write
131-
environment: test
131+
environment: uid2-test
132132
steps:
133133
- uses: actions/checkout@v4
134134
with:
@@ -140,12 +140,13 @@ jobs:
140140
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
141141
aws_bucket_name: ${{ secrets.S3_BUCKET }}
142142
aws_distribution_id: ${{ secrets.AWS_DISTRIBUTION_ID }}
143+
deploy_index_html: 'true'
143144

144145
approval-to-deploy:
145146
name: Approval To Deploy
146147
needs: [cdn-deployment-test]
147148
runs-on: ubuntu-latest
148-
environment: production
149+
environment: approve-deployment
149150
steps:
150151
- name: Approval to deploy
151152
shell: bash
@@ -187,3 +188,4 @@ jobs:
187188
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
188189
aws_bucket_name: ${{ secrets.S3_BUCKET }}
189190
aws_distribution_id: ${{ secrets.AWS_DISTRIBUTION_ID }}
191+
deploy_index_html: 'true'

.github/workflows/secureSignal-to-cdn.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release UID2/EUID Secure Signal Package to CDN (Five Environments)
1+
name: Release Secure Signal Package to CDN (v2)
22
run-name: ${{ github.action_ref == 'refs/head/main' && 'Release' || 'Publish Pre-release' }} UID2/EUID Secure Signal Package to CDN (Five Environments) by @${{ github.actor }}
33

44
on:
@@ -64,7 +64,7 @@ jobs:
6464
runs-on: ubuntu-latest
6565
permissions:
6666
id-token: write
67-
environment: test
67+
environment: uid2-test
6868
steps:
6969
- uses: actions/checkout@v4
7070
- name: Deploy UID2 Secure Signals to Test CDN
@@ -80,14 +80,14 @@ jobs:
8080
name: Approval To Deploy to All Environments
8181
needs: [deployment-test]
8282
runs-on: ubuntu-latest
83-
environment: production
83+
environment: approve-deployment
8484
steps:
8585
- name: Approval to deploy
8686
shell: bash
8787
run: echo "Approved for deployment to all environments"
8888

8989
# Matrix Deployment for All Environments
90-
deployment-matrix:
90+
cdn-deployment:
9191
needs: [build, approval-to-deploy]
9292
runs-on: ubuntu-latest
9393
permissions:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uid2/uid2-sdk",
3-
"version": "4.0.39",
3+
"version": "4.0.47-SNAPSHOT",
44
"description": "UID2 Client SDK",
55
"author": "The Trade Desk",
66
"repository": {

0 commit comments

Comments
 (0)