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

sandeep/setting up a test uat env #288

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: publish_to_pages_staging
description: Publishes to cloudflare pages (staging)
name: publish_to_pages
description: Publishes to cloudflare pages
inputs:
CLOUDFLARE_ACCOUNT_ID:
description: Cloudflare account id
required: true
CLOUDFLARE_API_TOKEN:
description: Cloudflare token
required: true
CF_BRANCH:
description: Cloudflare branch
required: true
runs:
using: composite
steps:
Expand All @@ -17,6 +20,6 @@ runs:
run: |-
npm i [email protected]
cd build
npx wrangler pages deploy . --project-name=deriv-developers-portal-pages --branch=staging
npx wrangler pages deploy . --project-name=deriv-developers-portal-pages --branch=${{ inputs.CF_BRANCH }}
echo "New staging website - https://staging-api.deriv.com/"
shell: bash
3 changes: 2 additions & 1 deletion .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ jobs:
RELEASE_TAG: ${{ github.sha }}
RELEASE_TYPE: staging
- name: Publish to Cloudflare Pages Staging
uses: ./.github/actions/publish_to_pages_staging
uses: ./.github/actions/publish_to_pages
with:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CF_BRANCH: staging
- name: Publish to Docker
uses: ./.github/actions/publish_to_docker
with:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deriv Api Docs Test/UAT Workflow
on:
pull_request:
branches:
- uat
workflow_dispatch:

env:
RELEASE_TYPE: Staging
jobs:
build_and_publish:
name: Builds and Publishes to Cloudflare Pages Test
environment: Staging
runs-on: ubuntu-latest
outputs:
RELEASE_VERSION: ${{ steps.extract_version.outputs.RELEASE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Node
uses: ./.github/actions/setup_node
- name: Install dependencies
uses: ./.github/actions/npm_install_from_cache
- name: Build
uses: ./.github/actions/build
with:
NODE_ENV: staging
TRACKJS_TOKEN: ${{ secrets.TRACKJS_TOKEN }}
- name: Versioning
uses: ./.github/actions/versioning
with:
RELEASE_TAG: ${{ github.ref_name }}
RELEASE_TYPE: ${{ env.RELEASE_TYPE }}
- name: Extract version
id: extract_version
run: echo "RELEASE_VERSION=$(cat build/version.txt)" >> $GITHUB_OUTPUT
- name: Publish to Cloudflare Pages Test
uses: ./.github/actions/publish_to_pages
with:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CF_BRANCH: test