Skip to content

Commit bf447e6

Browse files
committed
fix(ci): correct build artifacts paths in CI workflow
- Fix upload artifacts path: apps/web/dist → dist/apps/web - Fix smoke tests static server path to use dist/apps/web - Fix deploy job PostHog source map paths to use dist/apps/web - Fix GitHub Pages upload path to use dist/apps/web Resolves CI failures where smoke tests and deploy job could not find build artifacts. Build outputs are correctly located at dist/apps/web/ per Nx monorepo structure.
1 parent 7f53671 commit bf447e6

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ jobs:
283283
with:
284284
name: build-artifacts
285285
path: |
286-
apps/web/dist
287-
apps/cli/dist
288-
packages/*/dist
286+
dist/apps/web
287+
dist/apps/cli
288+
dist/packages/*/dist
289289
retention-days: 1
290290

291291
- name: Upload coverage
@@ -797,8 +797,7 @@ jobs:
797797

798798
- name: Start preview server for smoke tests
799799
run: |
800-
cd apps/web
801-
# Use built-in Node.js HTTP module to serve pre-built artifacts
800+
# Use built-in Node.js HTTP module to serve pre-built artifacts from dist/apps/web
802801
# This is much faster than pnpm preview which rebuilds everything and doesn't require extra packages
803802
node -e "
804803
const http = require('http');
@@ -808,7 +807,7 @@ jobs:
808807
809808
const server = http.createServer((req, res) => {
810809
const parsedUrl = url.parse(req.url, true);
811-
let filePath = path.join(__dirname, 'dist', parsedUrl.pathname === '/' ? 'index.html' : parsedUrl.pathname);
810+
let filePath = path.join(__dirname, '../../dist/apps/web', parsedUrl.pathname === '/' ? 'index.html' : parsedUrl.pathname);
812811
813812
const extname = path.extname(filePath);
814813
const contentType = {
@@ -904,21 +903,21 @@ jobs:
904903
run: npm install -g @posthog/cli
905904

906905
- name: Inject source map metadata
907-
run: posthog-cli --host https://eu.posthog.com sourcemap inject --version ${{ github.sha }} --directory ./apps/web/dist
906+
run: posthog-cli --host https://eu.posthog.com sourcemap inject --version ${{ github.sha }} --directory ./dist/apps/web
908907
env:
909908
POSTHOG_CLI_TOKEN: ${{ secrets.POSTHOG_CLI_TOKEN }}
910909
POSTHOG_CLI_ENV_ID: ${{ secrets.POSTHOG_CLI_ENV_ID }}
911910

912911
- name: Upload source maps to PostHog
913-
run: posthog-cli --host https://eu.posthog.com sourcemap upload --directory ./apps/web/dist --delete-after
912+
run: posthog-cli --host https://eu.posthog.com sourcemap upload --directory ./dist/apps/web --delete-after
914913
env:
915914
POSTHOG_CLI_TOKEN: ${{ secrets.POSTHOG_CLI_TOKEN }}
916915
POSTHOG_CLI_ENV_ID: ${{ secrets.POSTHOG_CLI_ENV_ID }}
917916

918917
- name: Upload build artifacts
919918
uses: actions/upload-pages-artifact@v4
920919
with:
921-
path: apps/web/dist
920+
path: dist/apps/web
922921

923922
- name: Deploy to GitHub Pages
924923
id: deployment

0 commit comments

Comments
 (0)