removed --env flags #2
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: Staging Deployment | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
deploy_staging: | |
name: Deploy Production | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: ${{ vars.ENV_URL }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.1.0' | |
- name: Install dependencies | |
run: npm install | |
- name: Prebuild | |
run: npm run build | |
env: | |
MONGO_CONNECTION_STRING: ${{ secrets.MONGO_CONNECTION_STRING }} | |
- name: Publish to Vercel | |
working-directory: ./runtime-environment | |
env: | |
MONGO_CONNECTION_STRING: ${{ secrets.MONGO_CONNECTION_STRING }} | |
CLOUDINARY_NAME: ${{ secrets.CLOUDINARY_NAME }} | |
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} | |
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} | |
JWT_SECRET: ${{ secrets.JWT_SECRET }} | |
REVALIDATE_URL: ${{ vars.REVALIDATE_URL }} | |
run: | | |
npm install -g vercel | |
vercel --token ${{ secrets.VERCEL_TOKEN }} -n ${{ vars.VERCEL_PROJECT }} --yes --prod | |
- name: Success | |
run: echo "🚀 Deploy successful 🚀 " |