Skip to content

Merge pull request #120 from shontzu-deriv/shontzu/unable-create-mt5-… #108

Merge pull request #120 from shontzu-deriv/shontzu/unable-create-mt5-…

Merge pull request #120 from shontzu-deriv/shontzu/unable-create-mt5-… #108

name: Build staging and Deploy to Cloudflare Pages
on:
push:
branches:
- 'main'
concurrency:
group: cloudflare-pages-build-staging
cancel-in-progress: true
jobs:
build_to_cloudflare_pages:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout to main branch
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
shell: bash
- name: Build staging
run: npm run build
- name: Run tests for Eslint
run: npm run test:lint
- name: Run unit tests and coverage report
run: npm run test
- name: Publish to CF pages branch
id: publish_to_pages_branch
uses: "deriv-com/shared-actions/.github/actions/publish_to_pages_branch@v1"
with:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
project_name: "traders-hub"
branch_name: staging
output_dir: dist
env:
RUDDERSTACK_KEY: ${{ vars.VITE_RUDDERSTACK_KEY }}