Skip to content

Various deploy job fixes #28

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

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from
Open

Various deploy job fixes #28

wants to merge 6 commits into from

Conversation

jorgeatorres
Copy link
Member

@jorgeatorres jorgeatorres commented Jul 1, 2025

This PR:

  • Updates the cache and checkout action versions used in this workflow, with v2 no longer being supported.
  • Updates the PHP version in use for the Composer step, with 7.4 no longer being supported by the required packages.
  • Makes the version input optional, defaulting to building the docs for the latest WC version from the woocommerce repository.
  • Adds some logic to prevent re-building the code reference for a version that was already built.
  • Turns the workflow into a cron job that runs at 23:00 UTC every day.

Closes woocommerce/woocommerce#57960.

Testing instructions

  1. Fork the woocommerce/woocommerce repository.
  2. In this fork, create two draft releases:
    1. One with tag name 9.9.4, marked as the latest and attaching the ZIP from WordPress.org as woocommerce.zip.
    2. One with tag name 9.9.5, marked as the latest and attaching the ZIP from WordPress.org as woocommerce.zip.
  3. Fork this repository as well (woocommerce/code-reference). Make sure that your fork has all branches (not just trunk) and that this branch (deploy-job-fixes) is merged into trunk.
  4. In your fork of code-reference:
    1. Ensure that actions are enabled in the Actions tab.

    2. In Settings > Pages, set Source to deploy from the gh-pages branch.

    3. Go to https://<your username>.github.io/code-reference/classes/WooCommerce.html#property_version and confirm that you see that $version is said to be set to 9.8.5.

      Note: You might need to wait a few mins for GH pages to be deployed.

  5. Publish the 9.9.4 release in your fork of the core repo.
  6. Run workflow GitHub Pages deploy in your fork of the code-reference repo and wait until it completes.
  7. After a few minutes you should be able to refresh https://<your username>.github.io/code-reference/classes/WooCommerce.html#property_version and see that 9.9.4 is now the number associated to $version, meaning the docs were re-generated from the new version.
  8. Run workflow GitHub Pages deploy again and confirm that the second job (Build and deploy) is now skipped. This is because the docs for the latest version were already built.
  9. Publish the 9.9.5 release in your fork of the core repo.
  10. Run workflow GitHub Pages deploy in your fork of the code-reference repo and wait until it completes.
  11. After a few minutes you should be able to refresh https://<your username>.github.io/code-reference/classes/WooCommerce.html#property_version and confirm that the docs now correspond to version 9.9.5.

@jorgeatorres jorgeatorres changed the title Deploy job fixes Various deploy job fixes Jul 1, 2025
@jorgeatorres jorgeatorres marked this pull request as ready for review July 1, 2025 17:44
@jorgeatorres jorgeatorres requested review from a team, prettyboymp and joshuatf and removed request for a team and prettyboymp July 2, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub pages sites should be regenerated on every release
1 participant