Skip to content

Commit c515d6f

Browse files
committed
[patch] fix gha for pushing to stage
1 parent fa7fed4 commit c515d6f

File tree

5 files changed

+55
-99
lines changed

5 files changed

+55
-99
lines changed

.github/workflows/build-push.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy Staging
2+
on: push
3+
4+
env:
5+
NODE_VERSION: 18
6+
JAVA_VERSION: 11
7+
JAVA_DISTRIBUTION: 'adopt'
8+
9+
jobs:
10+
build-push:
11+
name: run tests, build and push
12+
runs-on: [ ubuntu-latest ]
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install Node ${{ env.NODE_VERSION }}
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: ${{ env.NODE_VERSION }}
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm run ci
24+
25+
- name: Lint tests
26+
run: npm run lint
27+
28+
- name: Run tests
29+
id: runTests
30+
run: npm run test
31+
32+
- name: Run coverage
33+
id: runCover
34+
if: steps.runTests.outcome == 'success'
35+
run: npm run cover
36+
37+
- name: upload codecov
38+
uses: codecov/codecov-action@v4
39+
if: steps.runCover.outcome == 'success'
40+
41+
- name: Call the Build bash script for QA
42+
# if: ${{ github.ref == 'refs/heads/master' }}
43+
id: build
44+
run: |
45+
./deployment/deploy-qa.sh

.github/workflows/deploy-qa.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.

deployment/deploy-qa.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ NC='\033[0m'
2929
echo -en "Invalidating cloudfront distribution for staging ...\n"
3030
aws configure set preview.cloudfront true
3131
aws cloudfront create-invalidation --distribution-id E10P37NG0GMER --paths /branch-staging-latest.min.js /example-staging
32+
3233
# Exit prompts
3334
echo -en "${GREEN}Done deploy QA script ...${NC}\n"

dev.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"APIEndpoint": "https://api2.branch.io",
3-
"sdkKey": null,
2+
"APIEndpoint": "https://api.stage.branch.io",
3+
"sdkKey": "key_live_feebgAAhbH9Tv85H5wLQhpdaefiZv5Dv",
44
"port": "3000"
55
}

example.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta content="http://branch.io/img/logo_icon_black.png" property="og:image" />
66
<meta content="Branch Metrics Web SDK Example App" property="og:title" />
77
<meta content="A basic example to demonstrate some of the ways that the Web SDK can be used" property="og:description" />
8-
<meta content='key_place_holder' name='branch_key'/>
8+
<meta content='your_key_here' name='branch_key'/>
99
<title>Branch Metrics Web SDK Example App</title>
1010
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
1111
<style type="text/css">
@@ -82,7 +82,9 @@ <h4>QR Code</h4>
8282
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
8383
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
8484
<script type="text/javascript">
85-
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="SCRIPT_URL_HERE";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener banner closeBanner closeJourney data deepview deepviewCta first init link logout removeListener setBranchViewData setIdentity track trackCommerceEvent logEvent disableTracking getBrowserFingerprintId crossPlatformIds lastAttributedTouchData setAPIResponseCallback qrCode setRequestMetaData setDMAParamsForEEA setAPIUrl getAPIUrl".split(" "), 0);
85+
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="dev/build.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener banner closeBanner closeJourney data deepview deepviewCta first init link logout removeListener setBranchViewData setIdentity track trackCommerceEvent logEvent disableTracking getBrowserFingerprintId crossPlatformIds lastAttributedTouchData setAPIResponseCallback qrCode setRequestMetaData setDMAParamsForEEA setAPIUrl getAPIUrl".split(" "), 0);
86+
87+
// branch.setAPIUrl("https://api.stage.branch.io")
8688

8789
branch.setAPIResponseCallback(function(url, method, requestBody, error, status, responseBody) {
8890
console.log('Request: ' + method + ' ' + url + ' body=' + JSON.stringify(requestBody));
@@ -248,8 +250,9 @@ <h4>QR Code</h4>
248250
"code_color":"#000000",
249251
"background_color": "#FFFFFF",
250252
"margin": 5,
251-
"width": 1000,
252-
"image_format": "png"
253+
"width": 2000,
254+
"image_format": "png",
255+
"center_logo_url": "https://cdn.branch.io/branch-assets/1570220119072-og_image.png",
253256
};
254257
var qrCodeParams = {
255258
tags: [ 'tag1', 'tag2' ],

0 commit comments

Comments
 (0)