Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
186fa73
Merge pull request #212 from hashicorp/repo-sync
hashibot-web May 9, 2025
95fd8a2
feat: add all-docs-paths to compare-api-responses script (#391)
LeahMarieBush May 14, 2025
d6571cc
remove inlcude, add warning comment
kelsi-hoyle May 16, 2025
a0c0270
comment on just the cli options
kelsi-hoyle May 16, 2025
063ca00
Add `terraform-plugin-mux@0.19.x` documentation (#400)
austinvalle May 16, 2025
da70862
Add `terraform-plugin-testing@1.13.x` documentation (#346)
bbasata May 16, 2025
7d9c058
Add `terraform-plugin-framework@v1.15.x` documentation (#355)
austinvalle May 16, 2025
67687e9
Make agent eng team owners of agent docs
lafentres May 14, 2025
104eb4c
Merge pull request #213 from hashicorp/kelsi-hoyle/TFDN-897/agent-doc…
kelsi-hoyle May 19, 2025
87d0de4
Set team-hcpt-agent-engineering as CODEOWNERS of agent docs (#399)
lafentres May 19, 2025
34ae9e8
Ignore gnu.org domain in link checker (#401)
RubenSandwich May 19, 2025
78ac47b
Repo sync (#403)
hashibot-web May 19, 2025
b172f2d
Add enough for barebones test
RubenSandwich May 19, 2025
342b4a6
Add push for testing
RubenSandwich May 19, 2025
60eb367
Fix workflow name
RubenSandwich May 19, 2025
12b0dc6
Add test file at root to check that PR opens
RubenSandwich May 19, 2025
c2e3369
login with github token
RubenSandwich May 19, 2025
4b56c79
Update gh token
RubenSandwich May 19, 2025
ec30b5c
Try just a git push
RubenSandwich May 19, 2025
102fcd7
Add back push head
RubenSandwich May 19, 2025
a6d16ef
merge into develop for now
RubenSandwich May 19, 2025
bcdc2bc
Remove push action
RubenSandwich May 19, 2025
27d44ff
remove comment that was messing up code
RubenSandwich May 19, 2025
67aa011
Get copy-cloud-docs-for-tfe compiling
RubenSandwich May 19, 2025
b84e5a6
Merge branch 'develop' into rn/add-copy-docs-workflow
RubenSandwich May 19, 2025
813da4b
Only building only version metadata
RubenSandwich May 19, 2025
4328005
Refactor to remove targetRepoLastSyncFile
RubenSandwich May 20, 2025
c0dc4e3
Downgrade remark to fix mdx v2 errors
RubenSandwich May 20, 2025
8439ce2
Get Copy cloud-docs for TFE working
RubenSandwich May 20, 2025
ac124bf
Check if the branch name already exists
RubenSandwich May 20, 2025
b9991dd
Fix type errors
RubenSandwich May 20, 2025
503dea9
Update the README with the new name
RubenSandwich May 20, 2025
5abeeed
Test the whole workflow connected together
RubenSandwich May 21, 2025
4c1a475
checkout the proper workflow file before running
RubenSandwich May 21, 2025
d51ac06
path should be a string
RubenSandwich May 21, 2025
d6a4a87
forgot a period
RubenSandwich May 21, 2025
e4af74d
Use latest sha for GHA run
RubenSandwich May 21, 2025
25db2b1
Forgot to build :facepalm:
RubenSandwich May 21, 2025
4b65042
double check that the checkout is working
RubenSandwich May 21, 2025
4b93b64
Add the current loc to checkout
RubenSandwich May 21, 2025
6f4f716
try the path just "testing"
RubenSandwich May 21, 2025
f5fdcc3
include the github workspace
RubenSandwich May 21, 2025
1d0c631
It's github.workspace
RubenSandwich May 21, 2025
a64e2f2
checkout is deleting previous folder contents
RubenSandwich May 21, 2025
1eab0df
Double check that the files are being moved over
RubenSandwich May 21, 2025
7cda500
fix move command
RubenSandwich May 21, 2025
631f326
fix a space in path
RubenSandwich May 21, 2025
444c6c9
list files for debugging
RubenSandwich May 21, 2025
ef17d02
What is in our base dir
RubenSandwich May 21, 2025
94742a5
copy dot files
RubenSandwich May 21, 2025
30c6d67
correct file path
RubenSandwich May 21, 2025
6c3b556
Automated Docs PR
hc-tfe-release-bot May 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
59 changes: 59 additions & 0 deletions .github/actions/copy-cloud-docs-for-tfe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# `copy-cloud-docs-for-tfe`

This composite action is consumed by the `copy-docs.yml` workflow, which is triggered
at the time of the Terraform Enterprise team's **APP_DEADLINE** event.

Roughly, it behaves as depicted in this diagram:

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

## Overview

This action looks for a few things in authored `mdx`, to determine
if sections or entire pages should be ignored from this copy process.

### Frontmatter

Adding a `tfc_only: true` line in markdown frontmatter signals to
the action that the associated `.mdx` file should not be handled in the copy process.

#### Example

```markdown
---
page_title: Assessments - API Docs - Terraform Cloud
tfc_only: true
description: >-
Assessment results contain information about continuous validation in
Terraform Cloud, like drift detection.
---
```

### HTML Comments

Specially formatted HTML comments can be used in matching pairs
to omit multiple **lines** of text from the copy process.

> **Warning**: This only works with MDX v1.

#### Example

```markdown
Some content available in both TFC & TFE...

<!-- BEGIN: TFC:only -->
## Some section

This will only be visible in TFC

<!-- END: TFC:only -->

More content available in both TFC & TFE...
```

> **Note**: More details are available in this [TFC/TFE Content exclusion][rfc] RFC.

[rfc]: https://docs.google.com/document/d/1DPJU6_7AdGIJVlwJUWBlRqREmYon2IgYf_DrtKjhkcE/edit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
page_title: API Docs - Terraform Cloud
description: >-
Use the API to manage runs, workspaces, policies, and more. This introduction
includes authentication, features, and formatting.
---

[link to transform]: /terraform/cloud-docs/api-docs
[agents link do not transform]: /cloud-docs/agents
[agents link2 do not transform]: /cloud-docs/agents/nested-path
[agents link3 do not transform]: /terraform/cloud-docs/agents
[json api document]: /cloud-docs/api-docs#json-api-documents
[json api error object]: https://jsonapi.org/format/#error-objects
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
page_title: This is a TFC-only file
description:
tfc_only: true
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
page_title: Test Docs
description: This is a test document
---

The associated file for this image should be copied

![An Image](/img/docs/image.png)

This link definition should be updated to /enterprise

[json api document]: /cloud-docs/api-docs#json-api-documents

[transform me](/cloud-docs/api-docs/users)

<CustomMdxComponent>Foobar</CustomMdxComponent>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
page_title: Private Registry - Terraform Cloud
description: >-
Use the Terraform Cloud private registry to share Terraform providers and
modules across your organization.
---

# Private Registry

-> **Note:** I am an info alert
=> **Note:** I am a success alert
~> **Note:** I am a warning alert
!> **Note:** I am a warning alert
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
tfc_only: true
---

This simulates a page that

- was previously copied over to TFE
(It will have an entry in `last-cloud-docs-sync.txt`)
- had `tfc_only: true` added **afterwards**

The expected behavior for this file is that
it will get pruned on the next copy-docs process.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
page_title: Test Docs
description: This is a test document
---

This is previously existing doc in ptfe-releases.
Ensure this does not get removed
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
page_title: Index
description: Index
---

This filename is shared between `cloud-docs/index.mdx` and `enterprise/index.mdx`.

This is a special case where we want to ignore the `cloud-docs` file.

See `IGNORE_LIST` for more details.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
page_title: Stale Page
description: This is a stale cloud-docs document
---

This represents a stale page, once copied from
terraform-docs-common, and now intended to be
pruned.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
website/docs/enterprise/stale-cloud-docs/index.mdx
website/img/docs/_favicon.ico
website/docs/enterprise/tfc_only.mdx
Loading
Loading