Skip to content

Merge pull request #279 from jim-deriv/fix-production-release-notific… #10

Merge pull request #279 from jim-deriv/fix-production-release-notific…

Merge pull request #279 from jim-deriv/fix-production-release-notific… #10

name: Deriv Api Docs Staging Workflow
on:
push:
branches:
- master
jobs:
build_and_publish:
name: Builds and Publishes to Cloudflare Pages Staging
runs-on: ubuntu-latest # TODO: Replace this with the appropriate runner for Deriv-Api-Docs when provided
environment: Staging
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: ./.github/actions/setup_node
- name: Install Dependencies
uses: ./.github/actions/npm_install_from_cache
- name: Invalidate Cache
uses: ./.github/actions/invalidate_master_cache
- name: Build
uses: ./.github/actions/build
with:
NODE_ENV: staging
- name: Versioning
uses: ./.github/actions/versioning
with:
RELEASE_TAG: ${{ github.sha }}
RELEASE_TYPE: staging
- name: Publish to Cloudflare Pages Staging
uses: ./.github/actions/publish_to_pages_staging
with:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Publish to Docker
uses: ./.github/actions/publish_to_docker
with:
DOCKER_LATEST_IMAGE_TAG: 'latest-staging'
DOCKER_IMAGE_TAG: ${{ github.ref_name }}
DOCKERHUB_ORGANISATION: ${{ secrets.DOCKERHUB_ORGANISATION }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Deploy to Kubernetes
uses: ./.github/actions/deploy_to_kubernetes
with:
K8S_VERSION: ${{ github.ref_name }}
K8S_NAMESPACE: 'deriv-com-api-staging'
CA_CRT: ${{ secrets.CA_CRT }}
SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }}
KUBE_SERVER: ${{ secrets.KUBE_SERVER }}
DOCKERHUB_ORGANISATION: ${{ secrets.DOCKERHUB_ORGANISATION }}