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

Commit f3970d3

Browse files
Merge pull request #288 from sandeep-deriv/sandeep/setup-test-uat-env
sandeep/setting up a test uat env
2 parents ef50ce9 + 25c5935 commit f3970d3

File tree

3 files changed

+50
-4
lines changed

3 files changed

+50
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
name: publish_to_pages_staging
2-
description: Publishes to cloudflare pages (staging)
1+
name: publish_to_pages
2+
description: Publishes to cloudflare pages
33
inputs:
44
CLOUDFLARE_ACCOUNT_ID:
55
description: Cloudflare account id
66
required: true
77
CLOUDFLARE_API_TOKEN:
88
description: Cloudflare token
99
required: true
10+
CF_BRANCH:
11+
description: Cloudflare branch
12+
required: true
1013
runs:
1114
using: composite
1215
steps:
@@ -17,6 +20,6 @@ runs:
1720
run: |-
1821
1922
cd build
20-
npx wrangler pages deploy . --project-name=deriv-developers-portal-pages --branch=staging
23+
npx wrangler pages deploy . --project-name=deriv-developers-portal-pages --branch=${{ inputs.CF_BRANCH }}
2124
echo "New staging website - https://staging-api.deriv.com/"
2225
shell: bash

.github/workflows/release_staging.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ jobs:
2727
RELEASE_TAG: ${{ github.sha }}
2828
RELEASE_TYPE: staging
2929
- name: Publish to Cloudflare Pages Staging
30-
uses: ./.github/actions/publish_to_pages_staging
30+
uses: ./.github/actions/publish_to_pages
3131
with:
3232
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
3333
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
34+
CF_BRANCH: staging
3435
- name: Publish to Docker
3536
uses: ./.github/actions/publish_to_docker
3637
with:

.github/workflows/release_test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deriv Api Docs Test/UAT Workflow
2+
on:
3+
pull_request:
4+
branches:
5+
- uat
6+
workflow_dispatch:
7+
8+
env:
9+
RELEASE_TYPE: Staging
10+
jobs:
11+
build_and_publish:
12+
name: Builds and Publishes to Cloudflare Pages Test
13+
environment: Staging
14+
runs-on: ubuntu-latest
15+
outputs:
16+
RELEASE_VERSION: ${{ steps.extract_version.outputs.RELEASE_VERSION }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
20+
- name: Setup Node
21+
uses: ./.github/actions/setup_node
22+
- name: Install dependencies
23+
uses: ./.github/actions/npm_install_from_cache
24+
- name: Build
25+
uses: ./.github/actions/build
26+
with:
27+
NODE_ENV: staging
28+
TRACKJS_TOKEN: ${{ secrets.TRACKJS_TOKEN }}
29+
- name: Versioning
30+
uses: ./.github/actions/versioning
31+
with:
32+
RELEASE_TAG: ${{ github.ref_name }}
33+
RELEASE_TYPE: ${{ env.RELEASE_TYPE }}
34+
- name: Extract version
35+
id: extract_version
36+
run: echo "RELEASE_VERSION=$(cat build/version.txt)" >> $GITHUB_OUTPUT
37+
- name: Publish to Cloudflare Pages Test
38+
uses: ./.github/actions/publish_to_pages
39+
with:
40+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
41+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
42+
CF_BRANCH: test

0 commit comments

Comments
 (0)