Skip to content

Commit 200cb1f

Browse files
nik13claude
andcommitted
Fix deploy workflow: clone parent repo manually for workspace deps
Previous approach failed because actions/checkout submodule auth didn't propagate. Now explicitly clones landing-page repo, then replaces product-docs submodule with the triggering commit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fce6894 commit 200cb1f

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
# Clone the parent landing-page repo (which has the pnpm workspace
14-
# and the chat-widget package that product-docs depends on).
15-
# product-docs is a submodule inside it — checkout recursively.
16-
- name: Checkout landing-page with submodules
17-
uses: actions/checkout@v3
18-
with:
19-
repository: future-agi/landing-page
20-
submodules: recursive
21-
token: ${{ secrets.GH_PAT }}
13+
# Clone parent landing-page repo which has the pnpm workspace
14+
# and @futureagi/chat-widget that product-docs depends on.
15+
- name: Clone landing-page workspace
16+
run: |
17+
git clone --depth 1 \
18+
https://x-access-token:${{ secrets.GH_PAT }}@github.com/future-agi/landing-page.git .
2219
23-
# The submodule may point to an older commit of product-docs.
24-
# Pull the latest from the branch that triggered this workflow.
25-
- name: Update product-docs to current commit
20+
# Replace the submodule with the actual commit that triggered this build
21+
- name: Checkout product-docs at trigger commit
2622
run: |
23+
rm -rf product-docs
24+
git clone --depth 1 --branch ${{ github.ref_name }} \
25+
https://x-access-token:${{ secrets.GH_PAT }}@github.com/future-agi/docs.git product-docs
2726
cd product-docs
28-
git fetch origin ${{ github.sha }}
2927
git checkout ${{ github.sha }}
3028
3129
- name: Set up Node.js
@@ -50,7 +48,7 @@ jobs:
5048
restore-keys: ${{ runner.os }}-pnpm-
5149

5250
- name: Install dependencies
53-
run: pnpm install --frozen-lockfile
51+
run: pnpm install --no-frozen-lockfile
5452

5553
- name: Create .env.production for build
5654
working-directory: product-docs

0 commit comments

Comments
 (0)