Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:binary-com/deriv-com into transla…
Browse files Browse the repository at this point in the history
…tion-90001234-ctrader-landing-changes
  • Loading branch information
mayuran-deriv committed Mar 26, 2024
2 parents febb8fc + 9a84036 commit 02545cd
Show file tree
Hide file tree
Showing 3,406 changed files with 92,154 additions and 94,341 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
22 changes: 9 additions & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"import/no-named-as-default": "off",
"deprecation/deprecation": "warn"
},
"parserOptions": {
Expand Down Expand Up @@ -83,7 +84,7 @@
]
}
],
"import/no-useless-path-segments": "error",
// "import/no-useless-path-segments": "error",
"import/prefer-default-export": 0,
"import/order": [
"error",
Expand Down Expand Up @@ -132,21 +133,16 @@
"jest": true
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"project": ["tsconfig.json", "themes/gatsby-theme-deriv/tsconfig.json"]
},
"node": {
"paths": [
"src"
],
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
"project": ["tsconfig.json", "themes/gatsby-theme-deriv/tsconfig.json"]
}
},
"react": {
"version": "17"
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/corewebvitals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
DATADOG_APP_KEY: ${{ secrets.GATSBY_DATADOG_APPLICATION_ID }}

- name: Post audit comment
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: Core Web Vitals Audit
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/generate-preview-link-eu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ concurrency:
jobs:
build_eu_to_cloudflare_pages:
runs-on: Ubuntu-latest
if: contains(github.event.pull_request.head.ref, 'multiple-build')
permissions:
checks: write
pull-requests: write
Expand Down Expand Up @@ -47,9 +46,8 @@ jobs:
''
].join('\n')
core.setOutput("comment", comment);
- name: Post Cloudflare Pages Preview comment
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
header: Cloudflare Pages EU Preview Comment
number: ${{github.event.pull_request.user.login}}
Expand All @@ -59,14 +57,6 @@ jobs:
- name: Setup node
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8

- name: Create npmrc file
shell: bash
run: echo "@deriv-com:registry=https://npm.pkg.github.com" >> .npmrc

- name: Setup install read-only token for deriv-com org
shell: bash
run: echo '//npm.pkg.github.com/:_authToken=${{ secrets.READ_DERIV_COM_ORG_PACKAGES }}' >> .npmrc

- name: Get build output from master cache
uses: actions/cache/restore@e12d46a63a90f2fae62d114769bbf2a179198b5c
with:
Expand All @@ -76,7 +66,6 @@ jobs:
path: |
sites/eu/.cache
sites/eu/public
- name: Install Dependencies
uses: "./.github/actions/npm_install_from_cache"

Expand Down Expand Up @@ -105,7 +94,6 @@ jobs:
echo "$EVENT_NUMBER" > .pr/NR
echo "$EVENT_USERNAME" > .pr/USERNAME
echo "$HEAD_REF" > .pr/BRANCHNAME
- name: Publish to Cloudflare Pages
id: publish-to-pages
env:
Expand All @@ -130,7 +118,6 @@ jobs:
echo "Deployment to Cloudflare Pages failed."
exit 1
fi
- name: 'Generate preview link comment'
if: success()
id: generate_preview_url
Expand Down Expand Up @@ -168,7 +155,7 @@ jobs:
core.setOutput("comment", comment);
- name: Post Cloudflare Pages Preview comment
if: success() || failure()
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
header: Cloudflare Pages Preview Comment
number: ${{github.event.number}}
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/generate-preview-link-row.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ concurrency:
jobs:
build_row_to_cloudflare_pages:
runs-on: Ubuntu-latest
# To be removed once released in production
if: contains(github.event.pull_request.head.ref, 'multiple-build')
permissions:
checks: write
pull-requests: write
Expand Down Expand Up @@ -50,7 +48,7 @@ jobs:
core.setOutput("comment", comment);
- name: Post Cloudflare Pages Preview comment
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
header: Cloudflare Pages ROW Preview Comment
number: ${{github.event.pull_request.user.login}}
Expand All @@ -60,14 +58,6 @@ jobs:
- name: Setup node
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8

- name: Create npmrc file
shell: bash
run: echo "@deriv-com:registry=https://npm.pkg.github.com" >> .npmrc

- name: Setup install read-only token for deriv-com org
shell: bash
run: echo '//npm.pkg.github.com/:_authToken=${{ secrets.READ_DERIV_COM_ORG_PACKAGES }}' >> .npmrc

- name: Get build output from master cache
uses: actions/cache/restore@e12d46a63a90f2fae62d114769bbf2a179198b5c
with:
Expand Down Expand Up @@ -169,7 +159,7 @@ jobs:
core.setOutput("comment", comment);
- name: Post Cloudflare Pages Preview comment
if: success() || failure()
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
header: Cloudflare Pages Preview Comment
number: ${{github.event.number}}
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/generate-preview-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
core.setOutput("comment", comment);
- name: Post Cloudflare Pages Preview comment
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
header: Cloudflare Pages Preview Comment
number: ${{github.event.pull_request.user.login}}
Expand All @@ -58,14 +58,6 @@ jobs:
- name: Setup node
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8

- name: Create npmrc file
shell: bash
run: echo "@deriv-com:registry=https://npm.pkg.github.com" >> .npmrc

- name: Setup install read-only token for deriv-com org
shell: bash
run: echo '//npm.pkg.github.com/:_authToken=${{ secrets.READ_DERIV_COM_ORG_PACKAGES }}' >> .npmrc

- name: Get build output from master cache
uses: actions/cache/restore@e12d46a63a90f2fae62d114769bbf2a179198b5c
with:
Expand Down Expand Up @@ -176,7 +168,7 @@ jobs:
core.setOutput("comment", comment);
- name: Post Cloudflare Pages Preview comment
if: success() || failure()
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
header: Cloudflare Pages Preview Comment
number: ${{github.event.number}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Add comment to PR
id: loading_comment_to_pr
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr_information.outputs.issue_number }}
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Add comment to PR
id: comment_to_pr
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.issue.number }}
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/production-eu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Production CF for EU

on:
push:
tags:
- 'production*'
paths-ignore:
- '**.md'

env:
GATSBY_CPU_COUNT: 16
GATSBY_ENV: production
NODE_OPTIONS: '--max_old_space_size=7168'
GATSBY_DATADOG_APPLICATION_ID: ${{ secrets.GATSBY_DATADOG_APPLICATION_ID }}
GATSBY_DATADOG_CLIENT_TOKEN: ${{ secrets.GATSBY_DATADOG_CLIENT_TOKEN }}
GATSBY_MAP_API_KEY: ${{ secrets.GATSBY_MAP_API_KEY }}
GATSBY_GROWTHBOOK_CLIENT_KEY: ${{ secrets.GATSBY_GROWTHBOOK_CLIENT_KEY }}
GATSBY_GROWTHBOOK_DECRYPTION_KEY: ${{ secrets.GATSBY_GROWTHBOOK_DECRYPTION_KEY }}
GATSBY_RUDDERSTACK_STAGING_KEY: ${{ secrets.GATSBY_RUDDERSTACK_STAGING_KEY }}
GATSBY_RUDDERSTACK_PRODUCTION_KEY: ${{ secrets.GATSBY_RUDDERSTACK_PRODUCTION_KEY }}
GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }}
GATSBY_TRUSTPILOT_API_KEY: ${{ secrets.GATSBY_TRUSTPILOT_API_KEY }}
GATSBY_HOTJAR_ID: ${{ secrets.GATSBY_HOTJAR_ID }}

jobs:
release-production:
timeout-minutes: 40
runs-on: Runner_16cores
environment: production
steps:
- name: Checkout 🛎️
uses: actions/[email protected]

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'

- name: Set version env variable
run: echo "GATSBY_DERIV_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- run: npm ci
- run: npm run format
- run: npm run test
- run: npm run build:eu

# For using same tag for staging and production we need to uncomment these two below lines:
# with:
# tagRegex: "production(.*)"
- name: Deploy to Cloudflare ☁️
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy sites/eu/public --project-name=eu-deriv-com-pages --branch=main

- name: Cloudflare production link ✨
run: echo "New website - http://eu-deriv-com-pages.pages.dev"
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: production
path: sites/eu/public
retention-days: 5
66 changes: 66 additions & 0 deletions .github/workflows/production-row.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Production CF for Row

on:
push:
tags:
- 'production*'
paths-ignore:
- '**.md'

env:
GATSBY_CPU_COUNT: 16
GATSBY_ENV: production
NODE_OPTIONS: '--max_old_space_size=7168'
GATSBY_DATADOG_APPLICATION_ID: ${{ secrets.GATSBY_DATADOG_APPLICATION_ID }}
GATSBY_DATADOG_CLIENT_TOKEN: ${{ secrets.GATSBY_DATADOG_CLIENT_TOKEN }}
GATSBY_MAP_API_KEY: ${{ secrets.GATSBY_MAP_API_KEY }}
GATSBY_GROWTHBOOK_CLIENT_KEY: ${{ secrets.GATSBY_GROWTHBOOK_CLIENT_KEY }}
GATSBY_GROWTHBOOK_DECRYPTION_KEY: ${{ secrets.GATSBY_GROWTHBOOK_DECRYPTION_KEY }}
GATSBY_RUDDERSTACK_STAGING_KEY: ${{ secrets.GATSBY_RUDDERSTACK_STAGING_KEY }}
GATSBY_RUDDERSTACK_PRODUCTION_KEY: ${{ secrets.GATSBY_RUDDERSTACK_PRODUCTION_KEY }}
GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID: ${{ secrets.GATSBY_GOOGLE_TAG_MANAGER_TRACKING_ID }}
GATSBY_TRUSTPILOT_API_KEY: ${{ secrets.GATSBY_TRUSTPILOT_API_KEY }}
GATSBY_HOTJAR_ID: ${{ secrets.GATSBY_HOTJAR_ID }}

jobs:
release-production:
timeout-minutes: 40
runs-on: Runner_16cores
environment: production
steps:
- name: Checkout 🛎️
uses: actions/[email protected]

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'

- name: Setup install read-only token for deriv-com org
shell: bash
run: echo '//npm.pkg.github.com/:_authToken=${{ secrets.READ_DERIV_COM_ORG_PACKAGES }}' >> .npmrc

- run: npm ci
- run: npm run format
- run: npm run test
- run: npm run build:row

# For using same tag for staging and production we need to uncomment these two below lines:
# with:
# tagRegex: "production(.*)"
- name: Deploy to Cloudflare ☁️
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy sites/row/public --project-name=row-deriv-com-pages --branch=main

- name: Cloudflare production link ✨
run: echo "New website - http://row-deriv-com-pages.pages.dev"
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: production
path: sites/row/public
retention-days: 5
8 changes: 0 additions & 8 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ jobs:
- name: Set version env variable
run: echo "GATSBY_DERIV_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Create npmrc file
shell: bash
run: echo "@deriv-com:registry=https://npm.pkg.github.com" >> .npmrc

- name: Setup install read-only token for deriv-com org
shell: bash
run: echo '//npm.pkg.github.com/:_authToken=${{ secrets.READ_DERIV_COM_ORG_PACKAGES }}' >> .npmrc

- run: npm ci
- run: npm run format
- run: npm run test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smoketests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ jobs:
- name: Leave comment
if: always() && contains(steps.pr_information.outputs.draft, 'false')
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
header: Smoke tests status update
number: ${{ steps.pr_information.outputs.issue_number }}
message: '${{ steps.set_msg.outputs.msg }}'
recreate: true
recreate: true
Loading

0 comments on commit 02545cd

Please sign in to comment.