This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +50
-4
lines changed
Expand file tree Collapse file tree 3 files changed +50
-4
lines changed Original file line number Diff line number Diff line change 1- name : publish_to_pages_staging
2- description : Publishes to cloudflare pages (staging)
1+ name : publish_to_pages
2+ description : Publishes to cloudflare pages
33inputs :
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
1013runs :
1114 using : composite
1215 steps :
1720 run : |-
1821 npm i wrangler@3.10.1
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
Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments