change staging deploy to modify url from this environment
This commit is contained in:
parent
70d3162146
commit
87db689ec1
23
.github/workflows/cd.yml
vendored
23
.github/workflows/cd.yml
vendored
@ -1,16 +1,16 @@
|
|||||||
name: Deploy FrontEnd
|
name: Deploy FrontEnd
|
||||||
env:
|
|
||||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
||||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, develop ]
|
branches: [ main, develop ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-preview:
|
deploy-staging:
|
||||||
if: github.ref == 'refs/heads/develop'
|
if: github.ref == 'refs/heads/develop'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID_STAGING }}
|
||||||
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_STAGING }}
|
||||||
steps:
|
steps:
|
||||||
- name: 🏗 Setup repo
|
- name: 🏗 Setup repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -18,18 +18,21 @@ jobs:
|
|||||||
- name: 🏗 Install Vercel CLI
|
- name: 🏗 Install Vercel CLI
|
||||||
run: npm install --global vercel@latest
|
run: npm install --global vercel@latest
|
||||||
|
|
||||||
- name: 🏗 Pull preview vercel environment
|
- name: 🏗 Pull staging app from vercel environment
|
||||||
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_AUTH_TOKEN }}
|
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_AUTH_TOKEN }}
|
||||||
|
|
||||||
- name: 📦 Build app artifacts
|
- name: 📦 Build staging app artifacts
|
||||||
run: vercel build --token=${{ secrets.VERCEL_AUTH_TOKEN }}
|
run: vercel build --prod --token=${{ secrets.VERCEL_AUTH_TOKEN }}
|
||||||
|
|
||||||
- name: 📦 Deploy preview app artifacts to vercel
|
- name: 📦 Deploy staging app artifacts to vercel
|
||||||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_AUTH_TOKEN }}
|
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_AUTH_TOKEN }}
|
||||||
|
|
||||||
deploy-production:
|
deploy-production:
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
||||||
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||||
steps:
|
steps:
|
||||||
- name: 🏗 Setup repo
|
- name: 🏗 Setup repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user