Skip to content

[workflow] release workflow will update the docs on p5.js-website to older version #7746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 17 tasks
lirenjie95 opened this issue Apr 17, 2025 · 3 comments
Closed
1 of 17 tasks
Labels

Comments

@lirenjie95
Copy link
Contributor

lirenjie95 commented Apr 17, 2025

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

1.11.4 and 2.0

Web browser and version

Microsoft Edge, Version 135.0.3179.66 (Official build) (64-bit)

Operating system

Windows 11

Steps to reproduce this

Steps:

  1. Bump the version of p5.js to 1.11.4(example).
  2. After the release process is finished, check p5.js-website repo.
  3. Found a change commit contains contribute docs, which exactly changes to older version 1.11.3 docs.

Root cause:

I noticed this issue when I checked the p5.js-website repo and found the recent change by me got removed by the github-actions[bot]. The issue is because of release-workflow.yml. the sequence of build contains:

cd website
npm install
npm run build:contributor-docs
...
npm run build:p5-version

There are two important commands here, from the package.json file of the p5.js-website, we can see those details:

"build:contributor-docs": "tsx ./src/scripts/builders/contribute.ts",
...
"build:p5-version": "tsx ./src/scripts/p5-version.ts",

And we check the those two files and found in the contribute.ts:

let latestRelease = p5Version;
if (/^\d+\.\d+\.\d+$/.exec(latestRelease)) {
  latestRelease = 'v' + latestRelease;
}

await cloneLibraryRepo(clonedRepoPath, docsRepoUrl, latestRelease);

It will clone the p5.js repo with the p5Version tag. But we found in the p5-version.ts file, it will update the version number. So, the sequence will be: 1. clone the p5.js repo with old version (1.11.3) and use the docs inside it to update the p5.js website 2. then update the version (1.11.4) in p5.js-website repo.

This issue is also found in the release workflow file for release-workflow-v2.yml, and dev-2.0 branch(1) and dev-2.0 branch(2).

Potential Fix:

In the workflow file, move the npm run build:p5-version to the beginning of all npm run command. As a result, the bot will update the p5.js version first, and clone the p5.js repo with the new version and then use those docs to update p5.js website.
@limzykenneth (as you are the steward of Build Process) and @ksen0 (as you submitted the recent bump version change), could you please take a look at this issue? If you think my fix proposal is correct, please assign it to me! Thanks a lot!

@lirenjie95 lirenjie95 added the Bug label Apr 17, 2025
@ksen0
Copy link
Member

ksen0 commented Apr 17, 2025

Thanks for catching this @lirenjie95 ! Yes please go ahead with the patch.

@lirenjie95
Copy link
Contributor Author

Thanks for catching this @lirenjie95 ! Yes please go ahead with the patch.

After those PRs got merged, can you help revert this commit and rerun the release workflow manually?

@davepagurek
Copy link
Contributor

@lirenjie95 just pushed to main with updated content! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants