Compare commits
13 Commits
6d34c9cda2
...
ee1c6ad31b
Author | SHA1 | Date |
---|---|---|
adueck | ee1c6ad31b | |
adueck | adf86d6534 | |
adueck | f022277340 | |
adueck | 2024ad741a | |
adueck | d702bb797f | |
adueck | a477d260bb | |
adueck | 0ace4068c2 | |
adueck | 9ed5d2d6b5 | |
adueck | 7ec79438ca | |
adueck | ea222bacc4 | |
adueck | e2524751ea | |
adueck | 3772d557f8 | |
adueck | b3ef6db1fc |
|
@ -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"
|
||||||
|
|
|
@ -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 }}
|
|
@ -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 || "",
|
||||||
|
|
|
@ -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}`;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue