Skip to content

Commit 912666d

Browse files
committed
Refactor deployment workflow and preparation script. Removed redundant dependency installation step in the workflow and ensured dependencies are installed before generating contracts in the preparation script.
1 parent 47199fd commit 912666d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ jobs:
5555
run: pnpm install --frozen-lockfile
5656
working-directory: majestic-site
5757

58-
- name: Install majestic-api-contracts deps
59-
run: pnpm install --frozen-lockfile
60-
working-directory: majestic-api-contracts
61-
62-
- name: Prepare (copy docs, generate contracts, copy artifacts)
58+
- name: Prepare (copy docs, install contracts deps, generate, copy artifacts)
6359
run: pnpm run prepare
6460
working-directory: majestic-site
6561
env:

scripts/prepare.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ function prepareContracts() {
104104
);
105105
}
106106

107+
// Ensure deps installed before generate (self-contained; CI layout can vary)
108+
execSync('pnpm install --frozen-lockfile', { cwd: CONTRACTS_REPO, stdio: 'inherit' });
107109
execSync('pnpm run generate', { cwd: CONTRACTS_REPO, stdio: 'inherit' });
108110

109111
const contractPath = join(CONTRACTS_REPO, 'contract.json');

0 commit comments

Comments
 (0)