From a334df2a36fa0a625aa311b1cd632bbb2ea585fa Mon Sep 17 00:00:00 2001 From: dnehl <40561661+dnehl@users.noreply.github.com> Date: Thu, 25 Jun 2026 10:43:15 +0200 Subject: [PATCH] feat: adds amplify support --- .github/workflows/ci.yml | 27 ++++++++++++++++----- .npmrc | 1 + amplify.yml | 52 ++++++++++++++++++++++++++++++++++++++++ mise.lock | 37 ++++++++++++++++++++++++++++ mise.toml | 5 ++-- vercel.json | 8 ------- 6 files changed, 113 insertions(+), 17 deletions(-) create mode 100644 .npmrc create mode 100644 amplify.yml create mode 100644 mise.lock delete mode 100644 vercel.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29fbbaa..ca45de9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,25 +7,40 @@ on: - reopened - synchronize +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: check: + name: Lint, build and test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: jdx/mise-action@v2 + - name: Install mise + run: | + curl https://mise.run | MISE_VERSION=v2026.5.6 sh + echo "$HOME/.local/bin" >> "$GITHUB_PATH" + echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH" + export PATH="$HOME/.local/bin:$HOME/.local/share/mise/shims:$PATH" + mise install - - run: pnpm install --frozen-lockfile + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Install Playwright Browsers run: pnpm exec playwright install --with-deps - - run: pnpm run lint + - name: Lint + run: pnpm run lint - - run: pnpm run build + - name: Build + run: pnpm run build - - run: pnpm run test + - name: Test + run: pnpm run test diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..d67f374 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +node-linker=hoisted diff --git a/amplify.yml b/amplify.yml new file mode 100644 index 0000000..506b851 --- /dev/null +++ b/amplify.yml @@ -0,0 +1,52 @@ +version: 1 +applications: + - appRoot: packages/widget + frontend: + buildPath: "/" # install and build from the monorepo root + phases: + preBuild: + commands: + - curl https://mise.run | MISE_VERSION=v2026.5.6 sh + - export PATH="$HOME/.local/bin:$PATH" + - export PATH="$HOME/.local/share/mise/shims:$PATH" + - mise install + - pnpm install --frozen-lockfile + - echo "VITE_PERPS_BASE_URL=$VITE_PERPS_BASE_URL" >> packages/widget/.env + - echo "VITE_PERPS_API_KEY=$VITE_PERPS_API_KEY" >> packages/widget/.env + - echo "VITE_REOWN_PROJECT_ID=$VITE_REOWN_PROJECT_ID" >> packages/widget/.env + - echo "VITE_MORALIS_API_KEY=$VITE_MORALIS_API_KEY" >> packages/widget/.env + build: + commands: + - pnpm build:widget + artifacts: + baseDirectory: packages/widget/dist + files: + - "**/*" + cache: + paths: + - node_modules/**/* + - appRoot: packages/dashboard + frontend: + buildPath: "/" # install and build from the monorepo root + phases: + preBuild: + commands: + - curl https://mise.run | MISE_VERSION=v2026.5.6 sh + - export PATH="$HOME/.local/bin:$PATH" + - export PATH="$HOME/.local/share/mise/shims:$PATH" + - mise install + - pnpm install --frozen-lockfile + - echo "VITE_PERPS_BASE_URL=$VITE_PERPS_BASE_URL" >> packages/dashboard/.env + - echo "VITE_PERPS_API_KEY=$VITE_PERPS_API_KEY" >> packages/dashboard/.env + - echo "VITE_REOWN_PROJECT_ID=$VITE_REOWN_PROJECT_ID" >> packages/dashboard/.env + - echo "VITE_MORALIS_API_KEY=$VITE_MORALIS_API_KEY" >> packages/dashboard/.env + build: + commands: + - pnpm build:dashboard + artifacts: + baseDirectory: packages/dashboard/dist + files: + - "**/*" + cache: + paths: + - node_modules/**/* diff --git a/mise.lock b/mise.lock new file mode 100644 index 0000000..2d16fd4 --- /dev/null +++ b/mise.lock @@ -0,0 +1,37 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html + +[[tools.node]] +version = "24.15.0" +backend = "core:node" + +[tools.node."platforms.linux-arm64"] +checksum = "sha256:73afc234d558c24919875f51c2d1ea002a2ada4ea6f83601a383869fefa64eed" +url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-linux-arm64.tar.gz" + +[tools.node."platforms.linux-arm64-musl"] +checksum = "sha256:31e98aa960a067da91edffd5d93bc46657b5d2a8029612c359f5f2ac0060152a" +url = "https://unofficial-builds.nodejs.org/download/release/v24.15.0/node-v24.15.0-linux-arm64-musl.tar.gz" + +[tools.node."platforms.linux-x64"] +checksum = "sha256:44836872d9aec49f1e6b52a9a922872db9a2b02d235a616a5681b6a85fec8d89" +url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-linux-x64.tar.gz" + +[tools.node."platforms.linux-x64-musl"] +checksum = "sha256:f55af5bd489c5347b113ca6594cae00a54b30ba57ac5875324311bfc6f4762e3" +url = "https://unofficial-builds.nodejs.org/download/release/v24.15.0/node-v24.15.0-linux-x64-musl.tar.gz" + +[tools.node."platforms.macos-arm64"] +checksum = "sha256:372331b969779ab5d15b949884fc6eaf88d5afe87bde8ba881d6400b9100ffc4" +url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-darwin-arm64.tar.gz" + +[tools.node."platforms.macos-x64"] +checksum = "sha256:ffd5ee293467927f3ee731a553eb88fd1f48cf74eebc2d74a6babe4af228673b" +url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-darwin-x64.tar.gz" + +[tools.node."platforms.windows-x64"] +checksum = "sha256:cc5149eabd53779ce1e7bdc5401643622d0c7e6800ade18928a767e940bb0e62" +url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-win-x64.zip" + +[[tools."npm:pnpm"]] +version = "10.33.2" +backend = "npm:pnpm" diff --git a/mise.toml b/mise.toml index 3f1baa1..f7bea83 100644 --- a/mise.toml +++ b/mise.toml @@ -1,4 +1,3 @@ [tools] - -node="24" -pnpm="10" \ No newline at end of file +node = "24.15.0" +"npm:pnpm" = "10.33.2" diff --git a/vercel.json b/vercel.json deleted file mode 100644 index 1323cda..0000000 --- a/vercel.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "rewrites": [ - { - "source": "/(.*)", - "destination": "/index.html" - } - ] -}