Skip to content

Commit

Permalink
style: FRON-71 prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
borolepratik committed Aug 6, 2024
1 parent 3148d19 commit 075921e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy to Vercel

on:
workflow_run:
workflows: ["Lint", "CodeQL"]
workflows: ['Lint', 'CodeQL']
types:
- completed

Expand All @@ -13,52 +13,52 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: ⬇️ Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: ⬇️ Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: ⎔ Setup node
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
with:
version: 9
run_install: true
- name: ⎔ Setup node
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: 20

- name: Install dependencies
run: pnpm install
- name: Install pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
with:
version: 9
run_install: true

- name: Install Vercel CLI
run: npm install -g vercel@latest
- name: Install dependencies
run: pnpm install

- name: Deploy to Vercel
run: vercel --token ${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
- name: Install Vercel CLI
run: npm install -g vercel@latest

- name: Set CORS origin on Heroku
if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize'
run: |
PR_NUMBER=${{ github.event.number }}
DEPLOYMENT_URL=$(vercel --token ${{ secrets.VERCEL_TOKEN }} --confirm)
CURRENT_ORIGINS=$(heroku config:get ORIGINS --app ${{ secrets.HEROKU_APP_NAME }})
NEW_ORIGINS="${CURRENT_ORIGINS},${DEPLOYMENT_URL}"
heroku config:set ORIGINS=$NEW_ORIGINS --app ${{ secrets.HEROKU_APP_NAME }}
heroku config:set PR_${PR_NUMBER}_DEPLOYMENT_URL=$DEPLOYMENT_URL --app ${{ secrets.HEROKU_APP_NAME }}
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}

- name: Remove CORS origin from Heroku
if: github.event.action == 'closed'
run: |
PR_NUMBER=${{ github.event.number }}
DEPLOYMENT_URL=$(heroku config:get PR_${PR_NUMBER}_DEPLOYMENT_URL --app ${{ secrets.HEROKU_APP_NAME }})
CURRENT_ORIGINS=$(heroku config:get ORIGINS --app ${{ secrets.HEROKU_APP_NAME }})
NEW_ORIGINS=$(echo $CURRENT_ORIGINS | sed "s|,$DEPLOYMENT_URL||g" | sed "s|$DEPLOYMENT_URL,||g" | sed "s|$DEPLOYMENT_URL||g")
heroku config:set ORIGINS=$NEW_ORIGINS --app ${{ secrets.HEROKU_APP_NAME }}
heroku config:unset PR_${PR_NUMBER}_DEPLOYMENT_URL --app ${{ secrets.HEROKU_APP_NAME }}
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
- name: Deploy to Vercel
run: vercel --token ${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

- name: Set CORS origin on Heroku
if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize'
run: |
PR_NUMBER=${{ github.event.number }}
DEPLOYMENT_URL=$(vercel --token ${{ secrets.VERCEL_TOKEN }} --confirm)
CURRENT_ORIGINS=$(heroku config:get ORIGINS --app ${{ secrets.HEROKU_APP_NAME }})
NEW_ORIGINS="${CURRENT_ORIGINS},${DEPLOYMENT_URL}"
heroku config:set ORIGINS=$NEW_ORIGINS --app ${{ secrets.HEROKU_APP_NAME }}
heroku config:set PR_${PR_NUMBER}_DEPLOYMENT_URL=$DEPLOYMENT_URL --app ${{ secrets.HEROKU_APP_NAME }}
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}

- name: Remove CORS origin from Heroku
if: github.event.action == 'closed'
run: |
PR_NUMBER=${{ github.event.number }}
DEPLOYMENT_URL=$(heroku config:get PR_${PR_NUMBER}_DEPLOYMENT_URL --app ${{ secrets.HEROKU_APP_NAME }})
CURRENT_ORIGINS=$(heroku config:get ORIGINS --app ${{ secrets.HEROKU_APP_NAME }})
NEW_ORIGINS=$(echo $CURRENT_ORIGINS | sed "s|,$DEPLOYMENT_URL||g" | sed "s|$DEPLOYMENT_URL,||g" | sed "s|$DEPLOYMENT_URL||g")
heroku config:set ORIGINS=$NEW_ORIGINS --app ${{ secrets.HEROKU_APP_NAME }}
heroku config:unset PR_${PR_NUMBER}_DEPLOYMENT_URL --app ${{ secrets.HEROKU_APP_NAME }}
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"git": {
"deploymentEnabled": false
}
}
}

0 comments on commit 075921e

Please sign in to comment.