Skip to content

minor change in modal #512

minor change in modal

minor change in modal #512

name: Deploy Serverless Functions
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
jobs:
deploy-staging:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev'
environment:
name: staging
steps:
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: actions/checkout@v3
- uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GOOGLE_CLOUD_PROJECT_ID }}
credentials_json: ${{ secrets.GOOGLE_CLOUD_CREDENTIALS }}
- name: Installing binary dependencies
run: sudo apt-get install ripgrep
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Login to dotenv vault
run: npx dotenv-vault login ${{ secrets.DOTENV_ME }}
- name: Pull dotenv file
run: npx dotenv-vault pull staging
- name: Copy dotenv file
run: cp .env.staging apps/functions/serverless/.env.staging
- name: Deploy to Staging
env:
GCP_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT_ID }}
GCP_REGION: ${{ secrets.GCP_REGION }}
SORCEL_PROJECT_ROOT: ${{ github.workspace }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
SORCEL_API: sorcel-api
SORCEL_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT_ID }}
SORCEL_HASH_BUCKET_PREFIX: sorcel-bundled-functions
SORCEL_LOCATION: europe-west1
run: |
cd apps/functions
pnpm deploy:staging
deploy-production:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: production
steps:
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: actions/checkout@v3
- uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GOOGLE_CLOUD_PROJECT_ID }}
credentials_json: ${{ secrets.GOOGLE_CLOUD_CREDENTIALS }}
- name: Installing binary dependencies
run: sudo apt-get install ripgrep
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Login to dotenv vault
run: npx dotenv-vault login ${{ secrets.DOTENV_ME }}
- name: Pull dotenv file
run: npx dotenv-vault pull production
- name: Copy dotenv file and go to functions folder
run: cp .env.production apps/functions/serverless/.env.production
- name: Deploy to Production
env:
GCP_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT_ID }}
GCP_REGION: ${{ secrets.GCP_REGION }}
SORCEL_PROJECT_ROOT: ${{ github.workspace }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
SORCEL_API: sorcel-api
SORCEL_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT_ID }}
SORCEL_HASH_BUCKET_PREFIX: sorcel-bundled-functions
SORCEL_LOCATION: europe-west1
run: |
cd apps/functions
pnpm deploy:production