Merge pull request #609 from balakrishna-deriv/add-headers-file #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DSmartTrader Staging Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_and_test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Setup Node | |
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e | |
with: | |
node-version: 12 | |
- name: Install dependencies | |
uses: "./.github/actions/npm_install" | |
- name: Build Staging | |
uses: "./.github/actions/build" | |
with: | |
target: staging | |
- name: Build Translations | |
uses: "./.github/actions/build" | |
with: | |
target: translations | |
- name: Versioning | |
uses: "./.github/actions/versioning" | |
with: | |
target_branch: staging | |
- name: "Run Tests" | |
run: npm run test | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
name: dist | |
path: dist | |
publish_cloudflare_staging: | |
name: Publish to Cloudflare Pages Staging | |
runs-on: ubuntu-latest | |
needs: [build_and_test] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Setup Node | |
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 | |
with: | |
node-version: 20 | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: dist | |
path: dist | |
- name: Publish to Cloudflare | |
uses: "./.github/actions/publish_to_pages_staging" | |
with: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
- name: Build Docker image and push to Docker hub and K8S | |
uses: "./.github/actions/build_and_push_docker_image" | |
with: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | |
DOCKERHUB_ORGANISATION: ${{ secrets.DOCKERHUB_ORGANISATION }} | |
K8S_NAMESPACE: smarttrader-deriv-app-staging | |
KUBE_SERVER: ${{ secrets.KUBE_SERVER }} | |
SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }} | |
CA_CRT: ${{ secrets.CA_CRT }} | |
APP_VERSION: latest-staging |