Skip to content

Commit

Permalink
Merge pull request #39 from ubiquity-whilefoo/deploy-fix
Browse files Browse the repository at this point in the history
Deploy fix
  • Loading branch information
gentlementlegen authored Nov 26, 2024
2 parents 6e52eba + 7b58b81 commit cf289d3
Show file tree
Hide file tree
Showing 16 changed files with 208 additions and 137,518 deletions.
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "./src/adapters/supabase/**/**.ts", "/supabase/*"],
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "./src/adapters/supabase/**/**.ts", "/supabase/*", "dist/**"],
"useGitignore": true,
"language": "en",
"words": [
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/compute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ jobs:
name: "LLM Reply"
runs-on: ubuntu-latest
permissions: write-all
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
VOYAGEAI_API_KEY: ${{ secrets.VOYAGEAI_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
UBIQUITY_OS_APP_NAME: ${{ secrets.UBIQUITY_OS_APP_NAME }}

steps:
- uses: actions/checkout@v4
Expand All @@ -41,13 +34,12 @@ jobs:
with:
node-version: "20.10.0"

- name: install dependencies
run: yarn

- name: execute directive
run: yarn tsx ./src/main.ts
run: node ./dist/index.js
id: command-ask
env:
KERNEL_PUBLIC_KEY: ${{ secrets.KERNEL_PUBLIC_KEY }}
PLUGIN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
VOYAGEAI_API_KEY: ${{ secrets.VOYAGEAI_API_KEY }}
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/cspell.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/formatting-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Formatting Check

on:
push:

jobs:
format-check:
name: Check for formatting errors
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.10.0

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: bun install --frozen-lockfile

- name: Eslint
run: bun run eslint --fix-dry-run

- name: Cspell
run: bun run format:cspell

- name: Prettier
run: bun run prettier --check .
8 changes: 7 additions & 1 deletion .github/workflows/jest-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: bun install --frozen-lockfile

- name: Jest With Coverage
run: yarn install --immutable --immutable-cache --check-cache && yarn test
run: bun run test

- name: Add Jest Report to Summary
if: always()
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ jobs:
with:
node-version: 20.10.0

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: yarn install
run: bun install --frozen-lockfile

- name: Store PR number
run: echo ${{ github.event.number }} > pr-number.txt

- name: Run Knip
run: yarn knip || yarn knip --reporter json > knip-results.json
run: bun run knip || bun run knip --reporter json > knip-results.json

- name: Upload knip result
if: failure()
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/update-configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ jobs:
update-manifest:
name: "Update Manifest and Commit Changes"
runs-on: ubuntu-latest
permissions: write-all

steps:
- name: Update Manifest and Commit Changes
uses: ubiquity-os/action-deploy-plugin@main
with:
manifestPath: ${{ github.workspace }}/manifest.json
schemaPath: ${{ github.workspace }}/src/types/plugin-input.ts
pluginEntry: ${{ github.workspace }}/src/plugin.ts
treatAsEsm: true
sourcemap: false
pluginEntry: ${{ github.workspace }}/src/main.ts
commitMessage: "chore: updated manifest.json and dist build"
nodeVersion: "20.10.0"
env:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/worker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:

- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Update wrangler.toml Name Field
run: |
branch_name=$(echo '${{ github.event.ref }}' | sed 's#refs/heads/##' | sed 's#[^a-zA-Z0-9]#-#g')
Expand All @@ -31,10 +34,12 @@ jobs:
# Update the wrangler.toml file
sed -i '0,/^name = .*/{s/^name = .*/name = "'"$new_name"'"/}' wrangler.toml
echo "Updated wrangler.toml name to: $new_name"
- name: Deploy with Wrangler
id: wrangler_deploy
uses: cloudflare/wrangler-action@v3
with:
wranglerVersion: "3.87.0"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
secrets: |
Expand All @@ -43,13 +48,15 @@ jobs:
UBIQUITY_OS_APP_NAME
SUPABASE_URL
SUPABASE_KEY
${{ secrets.KERNEL_PUBLIC_KEY && secrets.KERNEL_PUBLIC_KEY != '' && 'KERNEL_PUBLIC_KEY' || '' }}
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
VOYAGEAI_API_KEY: ${{ secrets.VOYAGEAI_API_KEY }}
UBIQUITY_OS_APP_NAME: ${{ secrets.UBIQUITY_OS_APP_NAME }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
KERNEL_PUBLIC_KEY: ${{ secrets.KERNEL_PUBLIC_KEY }}

- name: Write Deployment URL to Summary
run: |
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
coverage/
Binary file added bun.lockb
Binary file not shown.
Loading

0 comments on commit cf289d3

Please sign in to comment.