Skip to content

Commit

Permalink
(fix, internal): GitHub workflow improvements for fern-bot server (#…
Browse files Browse the repository at this point in the history
…844)

Co-authored-by: Armando Belardo <[email protected]>
  • Loading branch information
dsinghvi and armandobelardo authored May 10, 2024
1 parent cc1ab7a commit 39955c0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy-fern-bot-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Deploy FernBot Dev

on:
push:
branches: main
branches:
- main
paths:
- "servers/fern-bot/**"
- ".github/workflows/deploy-fern-bot-dev.yml"
Expand All @@ -28,5 +29,7 @@ jobs:
- name: 📥 Install
uses: ./.github/actions/install
- name: 🚀 serverless deploy
env:
CI: false
run: |
pnpm --filter "@fern-platform/fern-bot" release --stage development
2 changes: 2 additions & 0 deletions .github/workflows/deploy-fern-bot-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
- name: 📥 Install
uses: ./.github/actions/install
- name: 🚀 serverless deploy
env:
CI: false
run: |
pnpm --filter "@fern-platform/fern-bot" install
pnpm --filter "@fern-platform/fern-bot" release --stage production
1 change: 1 addition & 0 deletions servers/fern-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@fern-platform/fern-bot",
"version": "0.0.0",
"scripts": {
"compile": "tsc --build",
"package": "sls package",
"release": "sls deploy",
"invoke": "sls invoke",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const verifySignature = async (app: App, request: Request): Promise<void> => {
// @ts-expect-error: octokit does not export the type needed here to be able to cast
name: eventName,
signature: request.headers.get("x-hub-signature-256")?.replace(/sha256=/, "") ?? "",
payload: await request.json(),
payload: await request.text(),
});
};

Expand Down
5 changes: 3 additions & 2 deletions servers/fern-bot/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"extends": "./tsconfig.paths.json",
"compilerOptions": {
"lib": ["ESNext"],
"lib": ["ESNext", "DOM"],
"moduleResolution": "node",
"noUnusedLocals": true,
"noUnusedParameters": true,
"removeComments": true,
"sourceMap": true,
"target": "ES2020",
"outDir": "lib"
"outDir": "lib",
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*.ts", "serverless.ts"],
"exclude": ["node_modules/**/*", ".serverless/**/*", ".webpack/**/*", "_warmup/**/*", ".vscode/**/*"],
Expand Down

0 comments on commit 39955c0

Please sign in to comment.