This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
Merge pull request #470 from farabi-deriv/fix--release-production-yml… #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deriv-com/binary-bot/release-staging | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release_staging: | |
name: Build, Test and Deploy to Cloudflare Pages | |
environment: Staging | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: "./.github/actions/setup_node" | |
with: | |
node-version: "18.x" | |
- name: Install Dependencies | |
uses: "./.github/actions/npm_install_from_cache" | |
- name: Build | |
uses: "./.github/actions/build" | |
with: | |
NODE_ENV: staging | |
GD_API_KEY: ${{ secrets.GD_API_KEY }} | |
GD_APP_ID: ${{ secrets.GD_APP_ID }} | |
GD_CLIENT_ID: ${{ secrets.GD_CLIENT_ID }} | |
TRACKJS_TOKEN: ${{ secrets.TRACKJS_TOKEN }} | |
DATADOG_CLIENT_LOGS_TOKEN: ${{ secrets.DATADOG_CLIENT_LOGS_TOKEN }} | |
DATADOG_LOGS_SESSION_SAMPLE_RATE: ${{ secrets.DATADOG_LOGS_SESSION_SAMPLE_RATE }} | |
REF_NAME: ${{ github.ref_name }} | |
- name: Test | |
uses: "./.github/actions/test" | |
- name: Deploy to Cloudflare Pages | |
uses: "./.github/actions/publish_to_cf_pages_staging" | |
with: | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
- name: Upload to vercel | |
uses: 'deriv-com/shared-actions/.github/actions/vercel_DR_publish@master' | |
with: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
VERCEL_TOKEN: ${{ secrets.VERCEL_API_TOKEN }} | |
ENVIRONMENT: Preview | |
VERCEL_SCOPE: deriv | |
ALIAS_DOMAIN_URL: 'staging-bot-dr.binary.sx' | |
send_slack_notification: | |
if: always() | |
needs: [release_staging] | |
environment: Staging | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Conclusion | |
uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 | |
- name: Send Slack Notification | |
uses: "./.github/actions/send_slack_notifications" | |
with: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
status: ${{ env.WORKFLOW_CONCLUSION }} | |
release_type: Staging | |
version: latest-master | |
app_url: https://staging-bot.deriv.com/ |