Skip to content

Commit

Permalink
testing llb deploy (#115)
Browse files Browse the repository at this point in the history
* testing llb deploy

* do cognito auth myself

* logging

* Revert "logging"

This reverts commit 016d88b.

* revert cicd change
  • Loading branch information
huang0h authored Sep 26, 2024
1 parent 14d1356 commit 3f89708
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: 'yarn'

- name: Install Dependencies
Expand All @@ -118,10 +118,10 @@ jobs:
- name: default deploy
uses: appleboy/lambda-action@master
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_access_key_id: ${{ secrets.LLB_AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.LLB_AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: monarch-monolith-lambda
function_name: monarch-backend-lambda
source: dist/apps/monarch/monarch-backend/main.js
environment: JOTFORM_AUTH_KEY=${{ secrets.MONARCH_JOTFORM_AUTH_KEY }}

Expand Down
8 changes: 4 additions & 4 deletions apps/monarch/monarch-backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ app.get('/geocode', async (req, res) => {
//Initializing CognitoExpress constructor
const cognitoExpress = new CognitoExpress({
region: "us-east-2",
cognitoUserPoolId: "us-east-2_jlRWv5ExI",
IdentityPoolId: 'us-east-2:bf437025-d7bb-4691-9217-6dfe652cde4d',
RoleArn: 'arn:aws:cognito-identity:us-east-2:489881683177:identitypool/us-east-2:bf437025-d7bb-4691-9217-6dfe652cde4d',
AccountId: '489881683177', // your AWS account ID
cognitoUserPoolId: "us-east-2_1rcy5geWJ",
IdentityPoolId: 'us-east-2:fd79ce99-02f6-452c-817d-dda8073a543a',
RoleArn: 'arn:aws:cognito-identity:us-east-2:144397330194:identitypool/us-east-2:fd79ce99-02f6-452c-817d-dda8073a543a',
AccountId: '144397330194', // your AWS account ID
tokenUse: "access", //Possible Values: access | id
tokenExpiration: 3600000 //Up to default expiration of 1 hour (3600000 ms)
});
Expand Down
15 changes: 15 additions & 0 deletions apps/monarch/monarch-frontend/src/amplifyconfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const AmplifyAuthConfig = {
"aws_project_region": "us-east-2",
"aws_cognito_identity_pool_id": "us-east-2:fd79ce99-02f6-452c-817d-dda8073a543a",
"aws_cognito_region": "us-east-2",
"aws_user_pools_id": "us-east-2_1rcy5geWJ",
"aws_user_pools_web_client_id": "3h0la4gb4btnhis1posrhjavh",
"oauth": {},
"aws_cognito_username_attributes": [],
"aws_cognito_social_providers": [],
"aws_cognito_signup_attributes": [
"EMAIL"
]
};

export default AmplifyAuthConfig;
6 changes: 3 additions & 3 deletions apps/monarch/monarch-frontend/src/app/AdminPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import { Auth, Amplify } from 'aws-amplify';
import { withAuthenticator } from '@aws-amplify/ui-react';
import '@aws-amplify/ui-react/styles.css';
// @ts-ignore
import awsmobile from '../aws-exports.js';
import awsconfig from '../amplifyconfig.js';
import { useEffect, useState } from 'react';
import { Tab, TabList, TabPanel, TabPanels, Tabs } from '@chakra-ui/react';
import { SearchTherapists } from './SearchTherapists.js';
import ManageTherapists from './ManageTherapists';
Amplify.configure(awsmobile);

Amplify.configure(awsconfig);

function AdminPage () {
const [accessToken, setAccessToken] = useState<string>('');
Expand Down
6 changes: 3 additions & 3 deletions apps/monarch/monarch-frontend/src/app/ManageTherapists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import { Amplify } from 'aws-amplify';
import { withAuthenticator } from '@aws-amplify/ui-react';
import '@aws-amplify/ui-react/styles.css';
// @ts-ignore
import awsmobile from '../aws-exports.js';
import awsconfig from '../amplifyconfig.js';
import AddPractitioner from './AddPractitioner';
import React, { useEffect, useState } from 'react';
import { useGeolocated } from 'react-geolocated';
Expand All @@ -22,7 +21,8 @@ import {
} from '@chakra-ui/react';
import { controller } from './actionsController';
import { PractitionerInfo } from '@c4c/monarch/common';
Amplify.configure(awsmobile);

Amplify.configure(awsconfig)

const renderBadges = (therapist: PractitionerInfo) => {
const badgeList = [
Expand Down

0 comments on commit 3f89708

Please sign in to comment.