Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit fd3e47e

Browse files
committed
Merge branch 'master' into fix-mx-message
2 parents a136507 + c109d5e commit fd3e47e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1396
-633
lines changed

.github/workflows/generate_app_id.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Binary App ID Generator
2+
3+
on:
4+
issue_comment:
5+
types: [edited]
6+
7+
jobs:
8+
generate_app_id:
9+
timeout-minutes: 5
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Capture Vercel preview URL
13+
id: vercel_preview_url
14+
uses: binary-com/vercel-preview-url-action@v0.0.3
15+
with:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
- name: Generate Binary App ID for deployment Preview URL
18+
id: generate_app_id
19+
uses: DerivFE/binary-app-id-action@master
20+
with:
21+
BINARY_API_TOKEN: ${{ secrets.BINARY_API_TOKEN }}
22+
BINARY_APP_ID: ${{ secrets.BINARY_APP_ID }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
max_retries: 5
25+
vercel_preview_url: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}
26+
- name: Comment on pull request with App ID and URLs
27+
id: sticky_comment_on_pr
28+
if: steps.generate_app_id.outputs.should_post_comment
29+
uses: marocchino/sticky-pull-request-comment@v1
30+
with:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
header: binary-app-id-action
33+
number: ${{github.event.issue.number}}
34+
message: |
35+
A production App ID was automatically generated for this PR. ([log](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}))
36+
37+
- **PR test**: [${{ steps.generate_app_id.outputs.pr_url }}](${{ steps.generate_app_id.outputs.pr_url }})
38+
- **URLs**:
39+
- **w/ App ID + Server**: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}/en/logged_inws.html?qa_server=frontend.binaryws.com&app_id=${{ steps.generate_app_id.outputs.app_id }}
40+
- **Original**: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}/en/logged_inws.html
41+
- **App ID**: `${{ steps.generate_app_id.outputs.app_id }}`
42+
43+
<details>
44+
<summary>Click here to copy & paste above information.</summary>
45+
46+
```
47+
- **PR**: [${{ steps.generate_app_id.outputs.pr_url }}](${{ steps.generate_app_id.outputs.pr_url }})
48+
- **URLs**:
49+
- **w/ App ID + Server**: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}/en/logged_inws.html?qa_server=frontend.binaryws.com&app_id=${{ steps.generate_app_id.outputs.app_id }}
50+
- **Original**: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}/en/logged_inws.html
51+
- **App ID**: `${{ steps.generate_app_id.outputs.app_id }}`
52+
```
53+
</details>
54+
55+
- name: Store generated URL in artifact
56+
run: echo "HOME_URL=${{ steps.vercel_preview_url.outputs.vercel_preview_url }}/en/logged_inws.html?qa_server=frontend.binaryws.com&app_id=${{ steps.generate_app_id.outputs.app_id }}" >> ${{ github.workspace }}/url.txt
57+
- name: Upload artifact
58+
uses: actions/upload-artifact@master
59+
with:
60+
name: generated_url
61+
path: ${{ github.workspace }}/url.txt
62+
retention-days: 1

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ In order to use your custom domain, please put it in a file named `CNAME` inside
2222
How to work with this project
2323
=============================
2424

25+
## Test link deployments
26+
27+
There are two types of test link deployment preview:
28+
29+
1. Automatic deployment
30+
31+
Upon creating PR, `vercel` (https://vercel.com/) will auto-generate test link inside the PR. you can use that to preview test link for the changes you have made.
32+
33+
2. Manual deployments
34+
35+
You can manually deploy your test link using gh-pages with the following configurations:
2536
### Deploy to your gh-pages for the first time
2637

2738
1. Register your application [here](https://developers.binary.com/applications/). This will give you the ability to redirect back to your github pages after login.
@@ -70,7 +81,7 @@ In order to remove the created folders from your gh-pages, you can use either:
7081
or
7182
- `grunt shell:remove_folder --keep --folder=br_branchname1,br_branchname2,...`: only keeps the specified folder(s) on your gh-pages and removes everything else. Just add the `--keep` flag.
7283

73-
### Preview on your local machine
84+
## Preview on your local machine
7485
- To preview your changes locally, run `sudo grunt serve`
7586
- It will watch for js/css changes and rebuild on every change you make.
7687
- To test changes made to templates, you need to re-compile them:

build/aliases.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,9 @@ release:
6464
releaseci:
6565
- 'default'
6666
- 'shell:compile_production'
67+
68+
release_test_link:
69+
- 'copy'
70+
- 'css'
71+
- 'js'
72+
- 'shell:compile_production'

build/config/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const isRelease = (grunt) => ['release', 'releaseci'].indexOf(grunt.cli.tasks[0]) != -1;
1+
const isRelease = (grunt) => ['release', 'releaseci', 'release_test_link'].indexOf(grunt.cli.tasks[0]) != -1;
22

33
const getReleaseTarget = (grunt) => {
44
const release_target = Object.keys(global.release_config).find(grunt.option);

package-lock.json

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

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"livereload": "sudo -p 'enter password for sudo:' grunt livereload",
88
"serve": "sudo -p 'enter password for sudo:' grunt serve",
99
"start": "sudo -p 'enter password for sudo:' grunt start",
10-
"eslint": "eslint --fix \"src/**/*.jsx\" src/"
10+
"eslint": "eslint --fix \"src/**/*.jsx\" src/",
11+
"build": "grunt release_test_link --production"
1112
},
1213
"repository": {
1314
"type": "git",
@@ -127,7 +128,7 @@
127128
"js-cookie": "2.2.0",
128129
"kinetic": "5.2.0",
129130
"moment": "2.19.4",
130-
"onfido-sdk-ui": "^6.7.2",
131+
"onfido-sdk-ui": "^6.3.0",
131132
"promise-polyfill": "6.1.0",
132133
"prop-types": "15.6.1",
133134
"react": "16.8.6",

scripts/config/pages.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module.exports = [
2525
['new_account/realws', 'app/new_account/real', 'default', 'Real Money Account Opening'],
2626
['new_account/virtualws', 'app/new_account/virtual', 'default', 'Create New Virtual-money Account'],
2727
['new_account/welcome', 'app/new_account/welcome_page', 'default', 'Welcome to Binary.com'],
28+
['new_account/welcome_onboarding', 'app/new_account/welcome_onboarding', 'default', 'Welcome to Binary.com'],
2829

2930
['resources', 'app/resources/index', 'default', 'Resources'],
3031
['resources/asset_indexws', 'app/resources/asset_index', 'full_width', 'Asset Index'],

0 commit comments

Comments
 (0)