This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
Aswathy/auto-pull-translation (#5861) #264
Workflow file for this run
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: Release Production | |
on: | |
push: | |
tags: | |
- 'production*' | |
paths-ignore: | |
- '**.md' | |
env: | |
GATSBY_CPU_COUNT: 16 | |
GATSBY_ENV: production | |
NODE_OPTIONS: '--max_old_space_size=7168' | |
GATSBY_DATADOG_APPLICATION_ID: ${{ secrets.GATSBY_DATADOG_APPLICATION_ID }} | |
GATSBY_DATADOG_CLIENT_TOKEN: ${{ secrets.GATSBY_DATADOG_CLIENT_TOKEN }} | |
GATSBY_MAP_API_KEY: ${{ secrets.GATSBY_MAP_API_KEY }} | |
GATSBY_GROWTHBOOK_CLIENT_KEY: ${{ secrets.GATSBY_GROWTHBOOK_CLIENT_KEY }} | |
GATSBY_GROWTHBOOK_DECRYPTION_KEY: ${{ secrets.GATSBY_GROWTHBOOK_DECRYPTION_KEY }} | |
GATSBY_RUDDERSTACK_STAGING_KEY: ${{ secrets.GATSBY_RUDDERSTACK_STAGING_KEY }} | |
GATSBY_RUDDERSTACK_PRODUCTION_KEY: ${{ secrets.GATSBY_RUDDERSTACK_PRODUCTION_KEY }} | |
jobs: | |
release-production: | |
timeout-minutes: 40 | |
runs-on: Runner_16cores | |
environment: production | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/[email protected] | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
- name: Set version env variable | |
run: echo "GATSBY_DERIV_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- run: npm ci | |
- run: npm run format | |
- run: npm run test | |
- run: npm run build | |
- name: Remove Storybook | |
uses: JesseTG/[email protected] | |
with: | |
path: public/storybook | |
- uses: olegtarasov/[email protected] | |
id: tagName | |
# For using same tag for staging and production we need to uncomment these two below lines: | |
# with: | |
# tagRegex: "production(.*)" | |
- name: Deploy to Cloudflare ☁️ | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
command: pages deploy public --project-name=deriv-com-pages --branch=main | |
- name: Cloudflare production link ✨ | |
run: echo "New website - http://cf-pages-deriv-com.deriv.com" | |
- name: Slack Notification 📣 | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
fields: workflow,repo | |
if_mention: failure,cancelled | |
custom_payload: | | |
{ | |
attachments: [{ | |
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning', | |
text: `Release for *Deriv.com* with version *$GIT_TAG_NAME*` | |
}] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
if: always() |