Skip to content

Commit 3aa26b0

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

File tree

4 files changed

+51
-95
lines changed

4 files changed

+51
-95
lines changed

.github/workflows/build-push.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
run: npm run test
30+
31+
- name: Run coverage
32+
run: npm run cover
33+
34+
- name: upload codecov
35+
uses: codecov/codecov-action@v4
36+
37+
- name: AWS, credentials setup
38+
# if: ${{ github.ref == 'refs/heads/master' }}
39+
uses: aws-actions/configure-aws-credentials@v4
40+
with:
41+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
42+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
43+
44+
- name: Call the Build bash script for QA
45+
# if: ${{ github.ref == 'refs/heads/master' }}
46+
id: build
47+
run: |
48+
./deployment/deploy-qa.sh

.github/workflows/deploy-qa.yml

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

deployment/deploy-qa.sh

100644100755
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
}

0 commit comments

Comments
 (0)