Skip to content

Copy docs workflow #404

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 68 commits into
base: develop
Choose a base branch
from
Open

Copy docs workflow #404

wants to merge 68 commits into from

Conversation

RubenSandwich
Copy link
Contributor

@RubenSandwich RubenSandwich commented May 19, 2025

Ticket

Description

Adds the "Copy Docs" workflow from mktg-content-workflows to UDR.

What this workflow does
On the selected release branch, it copies over terraform-docs-common into ptfe-releases and creates two PRs:

  1. The ACTUAL new ptfe-releases PR which is a new version
  2. The DIFF PR which showcases the changes from the docs last version of ptfe-releases

Future work

Once this work lands in main a few variables will have to be changed:

  1. https://github.com/hashicorp/web-unified-docs/pull/404/files#diff-121670f875c95eee1efdd5b0d05970c837358e530bbe290282e8fb11d7a883f2R91
  2. https://github.com/hashicorp/web-unified-docs/pull/404/files#diff-121670f875c95eee1efdd5b0d05970c837358e530bbe290282e8fb11d7a883f2R154
  3. https://github.com/hashicorp/web-unified-docs/pull/404/files#diff-121670f875c95eee1efdd5b0d05970c837358e530bbe290282e8fb11d7a883f2R227

Testing

  1. Because we cannot workflow dispatch until this work is on main, you will need to run it through the gh CLI:
    gh workflow run "Copy Cloud Docs For TFE" --ref "rn/add-copy-docs-workflow" --field branch="ptfe-releases/v000011-1"
  2. An ACTUAL and DIFF PR should be made for you and linked to in the GitHub action summary.

The branch ptfe-releases/v000011-1 is already made for you.

Copy link

github-actions bot commented May 19, 2025

Vercel Previews Deployed

Name Status Preview Updated (UTC)
Dev Portal ✅ Ready (Inspect) Visit Preview Fri May 23 21:03:41 UTC 2025
Unified Docs API ✅ Ready (Inspect) Visit Preview Fri May 23 20:57:43 UTC 2025

@RubenSandwich RubenSandwich changed the base branch from main to develop May 19, 2025 17:45
@RubenSandwich RubenSandwich changed the title Add enough for barebones test Copy docs workflow May 19, 2025
@RubenSandwich RubenSandwich marked this pull request as ready for review May 23, 2025 20:26
@RubenSandwich RubenSandwich requested a review from a team as a code owner May 23, 2025 20:26
echo "" >> $GITHUB_STEP_SUMMARY
echo "---" >> $GITHUB_STEP_SUMMARY

- name: Checkout workflow ref, ONLY USED FOR TESTING WILL REUSE RELEASE BRANCH CHECKOUT IN PROD
Copy link
Contributor Author

@RubenSandwich RubenSandwich May 23, 2025

Choose a reason for hiding this comment

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

❗ This step is only required for testing, will be removed after ❗

Copy link
Contributor

@LeahMarieBush LeahMarieBush left a comment

Choose a reason for hiding this comment

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

This looks and works great! The workflow was really fast. I have a few nitpick comments. Also, do we need to change the PR opener from you to hashibot/an automated account?


```mermaid
graph LR
A[terraform-docs-common] -->|copy `/cloud-docs/*` contents<br/>alongside `/enterprise/*` contents| B[ptfe-releases]
Copy link
Contributor

Choose a reason for hiding this comment

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

The /cloud-docs/* and /enterprise/* are showing as Unsupported markdown in the rich diff

const sourcePath = core.getInput('source_path')
const targetPath = core.getInput('target_path')
const newTFEVersion = core.getInput('new_TFE_version')
// const newTFEVersion = 'v000011-1'
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment can be removed

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.

2 participants