Skip to content

Commit

Permalink
Merge pull request #166 from utkarsha-deriv/utkarsha/add-vercel-to-re…
Browse files Browse the repository at this point in the history
…place-docker-k8-for-dr

Add vercel workflow to replace docker,k8 for disaster recovery
  • Loading branch information
ali-hosseini-deriv authored Jul 25, 2024
2 parents f75a098 + 59c47ee commit bab01b7
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ jobs:
with:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Upload to vercel
id: dr_action
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: Production
VERCEL_SCOPE: deriv
ALIAS_DOMAIN_URL: 'sinbad-dr.binary.sx'
- name: Send Slack Notification on Vercel Publish failure
uses: "deriv-com/shared-actions/.github/actions/send_slack_notification@master"
if: steps.dr_action.outcome != 'success'
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MESSAGE: "$RELEASE_TYPE Vercel Deployment for sinbad.software with version ${{ needs.build_and_test.outputs.RELEASE_VERSION }} has Failed"

send_slack_notification:
name: Send Slack notification
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,12 @@ jobs:
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-sinbad-dr.binary.sx'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ yarn-error.log

#CNAME
static/CNAME

# Vercel
.vercel
5 changes: 5 additions & 0 deletions vercel.dr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cleanUrls": true,
"outputDirectory": "dist",
"buildCommand": "echo ✅ Skipping build to use existing built files"
}
3 changes: 3 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cleanUrls": true
}

0 comments on commit bab01b7

Please sign in to comment.