Skip to content

feat: email copy

feat: email copy #21

name: Deploy Cloud Functions
on:
push:
branches: [ main, add-otp-cloud-functions ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.CLOUD_FUNCTIONS_DEPLOYER_TESTNET_SERVICE_ACCOUNT }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'Install dependencies and build'
run: |
cd packages/functions
npm install
npm run build
echo "Directory structure after build:"
find . -type f
- name: 'Deploy Cloud Functions'
run: |
cd packages/functions
echo "Current directory contents:"
ls -R
gcloud functions deploy verifyOTP \
--runtime nodejs18 \
--trigger-http \
--allow-unauthenticated \
--service-account=firebase-adminsdk-bygsj@pagoda-oboarding-dev.iam.gserviceaccount.com \
--region=us-central1 \
--entry-point=verifyOTP \
--source=lib \
--set-env-vars GMAIL_SENDER="${{ secrets.GMAIL_OTP_SENDER }}",GMAIL_PASSWORD="${{ secrets.GMAIL_OTP_SENDER_PASSWORD }}" # gmail or gsuite
gcloud functions deploy sendOTP \
--runtime nodejs18 \
--trigger-http \
--allow-unauthenticated \
--service-account=firebase-adminsdk-bygsj@pagoda-oboarding-dev.iam.gserviceaccount.com \
--region=us-central1 \
--entry-point=sendOTP \
--source=lib \
--set-env-vars GMAIL_SENDER="${{ secrets.GMAIL_OTP_SENDER }}",GMAIL_PASSWORD="${{ secrets.GMAIL_OTP_SENDER_PASSWORD }}" # gmail or gsuite