Skip to content

Add 'notary' role to user validation schema #76

Add 'notary' role to user validation schema

Add 'notary' role to user validation schema #76

Workflow file for this run

name: Node.js CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test
env:
PORT: ${{ secrets.PORT }}
HOST: http://localhost
MONGODB_URL: ${{ secrets.MONGODB_URL }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
JWT_ACCESS_EXPIRATION_MINUTES: ${{ secrets.JWT_ACCESS_EXPIRATION_MINUTES }}
JWT_REFRESH_EXPIRATION_DAYS: ${{ secrets.JWT_REFRESH_EXPIRATION_DAYS }}
JWT_RESET_PASSWORD_EXPIRATION_MINUTES: ${{ secrets.JWT_RESET_PASSWORD_EXPIRATION_MINUTES }}
JWT_VERIFY_EMAIL_EXPIRATION_MINUTES: ${{ secrets.JWT_VERIFY_EMAIL_EXPIRATION_MINUTES }}
SMTP_HOST: ${{ secrets.SMTP_HOST }}
SMTP_PORT: ${{ secrets.SMTP_PORT }}
SMTP_USERNAME: ${{ secrets.SMTP_USERNAME }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
EMAIL_FROM: ${{ secrets.EMAIL_FROM }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
GOOGLE_CALLBACK_URL: ${{ secrets.GOOGLE_CALLBACK_URL }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
FIREBASE_TYPE: ${{ secrets.FIREBASE_TYPE }}
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
FIREBASE_PRIVATE_KEY_ID: ${{ secrets.FIREBASE_PRIVATE_KEY_ID }}
FIREBASE_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }}
FIREBASE_CLIENT_EMAIL: ${{ secrets.FIREBASE_CLIENT_EMAIL }}
FIREBASE_CLIENT_ID: ${{ secrets.FIREBASE_CLIENT_ID }}
FIREBASE_AUTH_URI: ${{ secrets.FIREBASE_AUTH_URI }}
FIREBASE_TOKEN_URI: ${{ secrets.FIREBASE_TOKEN_URI }}
FIREBASE_AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.FIREBASE_AUTH_PROVIDER_X509_CERT_URL }}
FIREBASE_CLIENT_X509_CERT_URL: ${{ secrets.FIREBASE_CLIENT_X509_CERT_URL }}
FIREBASE_UNIVERSE_DOMAIN: ${{ secrets.FIREBASE_UNIVERSE_DOMAIN }}
FIREBASE_DATABASE_URL: ${{ secrets.FIREBASE_DATABASE_URL }}
FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }}
CLIENT_URL: ${{ secrets.CLIENT_URL }}
PAYOS_CLIENT_ID: ${{ secrets.PAYOS_CLIENT_ID }}
PAYOS_API_KEY: ${{ secrets.PAYOS_API_KEY }}
PAYOS_CHECKSUM_KEY: ${{ secrets.PAYOS_CHECKSUM_KEY }}
SERVER_URL: ${{ secrets.SERVER_URL }}
VIETQR_URL: ${{ secrets.VIETQR_URL }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
CONTRACT_ADDRESS: ${{ secrets.CONTRACT_ADDRESS }}
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
PINATA_SECRET_KEY: ${{ secrets.PINATA_SECRET_KEY }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install Railway
run: npm i -g @railway/cli
- name: Deploy
run: railway up --service ${{ secrets.RAILWAY_SERVICE_NAME}}
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}