Compare commits

..

13 Commits

Author SHA1 Message Date
adueck ee1c6ad31b ok functions CI/CD deploy works now 💪 2024-11-28 15:38:11 +05:00
adueck adf86d6534 testci 2024-11-28 15:34:37 +05:00
adueck f022277340 m 2024-11-28 15:31:02 +05:00
adueck 2024ad741a hmm creds not showing up for CI? 2024-11-28 15:23:37 +05:00
adueck d702bb797f oops 2024-11-28 15:15:56 +05:00
adueck a477d260bb try manual cdk deploy 2024-11-28 15:14:45 +05:00
adueck 0ace4068c2 add needed env stuff in workflow 2024-11-28 14:55:30 +05:00
adueck 9ed5d2d6b5 m 2024-11-28 14:50:05 +05:00
adueck 7ec79438ca hmm need to checkout prob 2024-11-28 14:42:57 +05:00
adueck ea222bacc4 rrg 2024-11-28 14:40:07 +05:00
adueck e2524751ea try fixing working directory issue 2024-11-28 14:36:50 +05:00
adueck 3772d557f8 oops 2024-11-28 14:31:59 +05:00
adueck b3ef6db1fc try functions deploy CI/CD first time 2024-11-28 14:29:24 +05:00
5 changed files with 51 additions and 3 deletions

View File

@ -1,9 +1,8 @@
name: deploy account name: Deploy Account
on: on:
push: push:
branches: branches:
- master - master
- dev
paths: paths:
- "account/**" - "account/**"
- ".github/workflows/deploy-account.yml" - ".github/workflows/deploy-account.yml"

45
.github/workflows/deploy-functions.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Deploy Functions
on:
push:
branches:
- master
paths:
- "functions/**"
- ".github/workflows/deploy-functions.yml"
workflow_dispatch:
jobs:
aws_cdk:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install AWS CDK
run: npm install -g aws-cdk
- name: CDK Deploy
run: |
npm install
cd website
npm install
cd ../account
npm install
cd ../functions
npm install
cdk deploy --require-approval never
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
LINGDOCS_DICTIONARY_SPREADSHEET: ${{ secrets.LINGDOCS_DICTIONARY_SPREADSHEET }}
LINGDOCS_DICTIONARY_SHEET_ID: ${{ secrets.LINGDOCS_DICTIONARY_SHEET_ID }}
LINGDOCS_SERVICE_ACCOUNT_EMAIL: ${{ secrets.LINGDOCS_SERVICE_ACCOUNT_EMAIL }}
LINGDOCS_SERVICE_ACCOUNT_KEY: ${{ secrets.LINGDOCS_SERVICE_ACCOUNT_KEY }}
DICT_R2_ENDPOINT: ${{ secrets.DICT_R2_ENDPOINT }}
DICT_R2_KEY_ID: ${{ secrets.DICT_R2_KEY_ID }}
DICT_R2_KEY_SECRET: ${{ secrets.DICT_R2_KEY_SECRET }}
DICT_R2_BUCKET: ${{ secrets.DICT_R2_BUCKET }}

View File

@ -2,6 +2,8 @@ import { Context } from "hono";
import { env } from "hono/adapter"; import { env } from "hono/adapter";
export type FEnvironment = { export type FEnvironment = {
// AWS_ACCESS_KEY_ID: string;
// AWS_SECRET_ACCESS_KEY: string;
LINGDOCS_DICTIONARY_SPREADSHEET: string; LINGDOCS_DICTIONARY_SPREADSHEET: string;
LINGDOCS_DICTIONARY_SHEET_ID: string; LINGDOCS_DICTIONARY_SHEET_ID: string;
LINGDOCS_SERVICE_ACCOUNT_EMAIL: string; LINGDOCS_SERVICE_ACCOUNT_EMAIL: string;
@ -13,6 +15,8 @@ export type FEnvironment = {
}; };
export const environment: FEnvironment = { export const environment: FEnvironment = {
// AWS_ACCESS_KEY_ID: process.env.AWS_ACCESS_KEY_ID || "",
// AWS_SECRET_ACCESS_KEY: process.env.AWS_SECRET_ACCESS_KEY || "",
LINGDOCS_DICTIONARY_SPREADSHEET: LINGDOCS_DICTIONARY_SPREADSHEET:
process.env.LINGDOCS_DICTIONARY_SPREADSHEET || "", process.env.LINGDOCS_DICTIONARY_SPREADSHEET || "",
LINGDOCS_DICTIONARY_SHEET_ID: process.env.LINGDOCS_DICTIONARY_SHEET_ID || "", LINGDOCS_DICTIONARY_SHEET_ID: process.env.LINGDOCS_DICTIONARY_SHEET_ID || "",

View File

@ -7,7 +7,7 @@ export const dictionaryFilename = "dictionary";
export const dictionaryInfoFilename = "dictionary-info"; export const dictionaryInfoFilename = "dictionary-info";
// const hunspellAffFileFilename = "ps_AFF.aff"; // const hunspellAffFileFilename = "ps_AFF.aff";
// const hunspellDicFileFilename = "ps_AFF.dic"; // const hunspellDicFileFilename = "ps_AFF.dic";
const allWordsJsonFilename = "all-words-dictionary.json"; // const allWordsJsonFilename = "all-words-dictionary.json";
const url = `${baseUrl}${dictionaryFilename}`; const url = `${baseUrl}${dictionaryFilename}`;
const infoUrl = `${baseUrl}${dictionaryInfoFilename}`; const infoUrl = `${baseUrl}${dictionaryInfoFilename}`;