Skip to content

Conversation

@Rajdeepc
Copy link
Contributor

@Rajdeepc Rajdeepc commented Nov 13, 2025

Description

Fixes the GitHub Actions workflow for publishing documentation by adding the 1st-gen/ prefix to all file paths, resolving the "file not found" error during CI builds.

Root Cause

The workflow's file operations (cp, output redirection, gh-pages deployment) were using paths without the 1st-gen/ prefix, while:

  • The Custom Elements Manifest is generated at: 1st-gen/projects/documentation/custom-elements.json
  • Documentation builds to: 1st-gen/projects/documentation/dist/
  • Storybook expects CEM at: 1st-gen/storybook/custom-elements.json

Changes

- run: cp projects/documentation/custom-elements.json storybook/
+ run: cp 1st-gen/projects/documentation/custom-elements.json 1st-gen/storybook/

- run: echo '/*    /index.html   200' > projects/documentation/dist/_redirects
+ run: echo '/*    /index.html   200' > 1st-gen/projects/documentation/dist/_redirects

- yarn gh-pages -d projects/documentation/dist
+ yarn gh-pages -d 1st-gen/projects/documentation/dist

Validation

Locally verified that the corrected paths work:

  • Custom Elements Manifest successfully generated at 1st-gen/projects/documentation/custom-elements.json
  • File successfully copied to 1st-gen/storybook/custom-elements.json

Motivation and context

The documentation site publishing workflow was failing in CI with:

cp: cannot stat 'projects/documentation/custom-elements.json': No such file or directoryError: Process completed with exit code 1.

This occurred because after the monorepo restructuring, all 1st-gen package files are located under the 1st-gen/ directory, but the workflow was still using the old root-level paths.

Related issue(s)

  • fixes [Issue Number]

Screenshots (if appropriate)


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result
  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

@changeset-bot
Copy link

changeset-bot bot commented Nov 13, 2025

⚠️ No Changeset found

Latest commit: 911121b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2025

📚 Branch Preview

🔍 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-5882

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@Rajdeepc Rajdeepc added Status: WIP PR is a work in progress or draft Component: Tooling Issue or PR dealing with scripts, workflows, automation, etc. Component prefix is for Jira labels Nov 13, 2025
@Rajdeepc Rajdeepc marked this pull request as ready for review November 13, 2025 12:59
@Rajdeepc Rajdeepc requested a review from a team as a code owner November 13, 2025 12:59
@Rajdeepc Rajdeepc added Status: Ready for review PR ready for review or re-review. and removed Status: WIP PR is a work in progress or draft labels Nov 13, 2025
@marissahuysentruyt
Copy link
Collaborator

@Rajdeepc The changes look good to me, and follow the patterns established in other scripts/commands.

Is there anyway you want me to validate and/or test the changes? (apart from just merging to main?)

@Rajdeepc
Copy link
Contributor Author

@Rajdeepc The changes look good to me, and follow the patterns established in other scripts/commands.

Is there anyway you want me to validate and/or test the changes? (apart from just merging to main?)

You can generate the CEM artifacts from the build steps on this file and see if you are getting errors or not.

@Rajdeepc Rajdeepc self-assigned this Nov 13, 2025
Copy link
Contributor

@caseyisonit caseyisonit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this merges make sure it’s a chore not a fix in the message since this doesn’t require a changeset

Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated by running changed commands as seen in publish-docs-site.yml:

yarn workspace @spectrum-web-components/1st-gen docs:analyze
cp 1st-gen/projects/documentation/custom-elements.json 1st-gen/storybook/
yarn workspace @spectrum-web-components/1st-gen docs:production
yarn workspace @spectrum-web-components/1st-gen storybook:build
Screenshot 2025-11-13 at 9 32 34 AM Screenshot 2025-11-13 at 9 33 01 AM Screenshot 2025-11-13 at 9 34 06 AM

@Rajdeepc Rajdeepc changed the title fix: publish script fix for documentation chore: publish script fix for documentation Nov 13, 2025
@Rajdeepc
Copy link
Contributor Author

When this merges make sure it’s a chore not a fix in the message since this doesn’t require a changeset

We’re currently not following conventional commit lint messaging, so this won’t appear in the changelog. However, I’ve updated it to chore for consistency.

@Rajdeepc Rajdeepc merged commit 25c18a1 into main Nov 13, 2025
22 checks passed
@Rajdeepc Rajdeepc deleted the rajdeep/publish-script-fix branch November 13, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Tooling Issue or PR dealing with scripts, workflows, automation, etc. Component prefix is for Jira Status: Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants