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

Commit e1092e5

Browse files
committed
feat: 🔥 setting up a test uat env
1 parent ef50ce9 commit e1092e5

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: publish_to_pages
2+
description: Publishes to cloudflare pages
3+
inputs:
4+
CLOUDFLARE_ACCOUNT_ID:
5+
description: Cloudflare account id
6+
required: true
7+
CLOUDFLARE_API_TOKEN:
8+
description: Cloudflare token
9+
required: true
10+
CF_BRANCH:
11+
description: Cloudflare branch
12+
required: true
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Publish to cloudflare pages (staging)
17+
env:
18+
CLOUDFLARE_ACCOUNT_ID: ${{ inputs.CLOUDFLARE_ACCOUNT_ID }}
19+
CLOUDFLARE_API_TOKEN: ${{ inputs.CLOUDFLARE_API_TOKEN }}
20+
run: |-
21+
22+
cd build
23+
npx wrangler pages deploy . --project-name=deriv-developers-portal-pages --branch=${{ inputs.CF_BRANCH }}
24+
echo "New staging website - https://staging-api.deriv.com/"
25+
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)