Skip to content

docs(newsletters): Add GHA workflow to add newsletter to archive - #4030

Merged
Scotchester merged 4 commits into
mainfrom
docs/automate-newsletter-addition
Sep 1, 2026
Merged

docs(newsletters): Add GHA workflow to add newsletter to archive#4030
Scotchester merged 4 commits into
mainfrom
docs/automate-newsletter-addition

Conversation

@Scotchester

Copy link
Copy Markdown
Member

Closes #3960


This PR adds a GitHub Actions workflow to add a new newsletter to our archive in the docs.

The workflow is triggered manually, taking the HubSpot ID of a marketing email. The script fetches the web version's HTML and images, adds them to the appropriate places in the docs folder, creates the shell page, and inserts a new entry into the index page. The shell page and the index page have some TK spots for @indexing to decide how he wants to summarize the content of that particular newsletter.

It commits the work to a new branch and then opens a PR.

See it being tested at: compilerla/actions-testing#170 (Not an exact representation – some minor tweaks have been made in the code submitted here).

@Scotchester
Scotchester requested a review from a team as a code owner August 28, 2026 22:42
@github-actions github-actions Bot added the actions Related to GitHub Actions workflows label Aug 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@jgravois jgravois left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks pretty cool so far!

once we're done tweaking can i run the workflow manually using an old HubSpot ID just to check out the draft PR and then close it?

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # 7.0.0
with:
python-version: "3.11"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

any reason not to use 3.12 (and pull from our .python-version file?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I used 3.11 because this originated in the customer-success repo, which is still using 3.11, but I'm sure it's safe to bump it up, so I'll go ahead and do that.

- name: Add card to index
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # 9.0.0
with:
script: |

@jgravois jgravois Aug 31, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what do you think about moving this business logic into a .js file and importing it like we're doing in agency-onboarding.yml so that we can take advantage of prettier autoformatting and basic linting?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed. This is best practice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sounds good 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

holler if the more modern 'import' syntax gives you any grief. things are extra convoluted in gh actions world.

@Scotchester

Copy link
Copy Markdown
Member Author

Updates made. Tested in actions-testing repo:

@jgravois jgravois left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks very promising. 🎇

would be cool to run the new workflow manually for the Aug update that dropped yesterday directly from this branch, but i think we have to wait until it hits main.

Comment on lines +32 to +33
HUBSPOT_ACCESS_TOKEN: ${{ secrets.HUBSPOT_EXPORT_ACCESS_TOKEN }}
HUBSPOT_INSTANCE_ID: ${{ secrets.HUBSPOT_INSTANCE_ID }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

these still need to be added as new repo secrets, yes?

@jgravois jgravois Sep 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if so, i could also get behind just naming the secret itself HUBSPOT_ACCESS_TOKEN.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes! Thank you for the reminder. I'll do that right now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah yeah, that's sort of a weird artifact from how it was set up in the customer-success repo, but no reason not to make them consistent here. Stand by.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sorry for the delayed reaction and then invalidating your review. I blame GitHub not fully auto-refreshing 🤪

jgravois
jgravois previously approved these changes Sep 1, 2026

@jgravois jgravois left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

😎

@jgravois jgravois left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry for ... invalidating your review

all good friend. 🤝

i've seen enough flakiness in tests-ui.yml lately to know your PR isn't the cause of the errors but we can wait a beat and try rerunning prior to merge again anyway.

@Scotchester
Scotchester force-pushed the docs/automate-newsletter-addition branch from ac42b76 to cf2864c Compare September 1, 2026 17:13
@Scotchester
Scotchester merged commit c16c025 into main Sep 1, 2026
11 checks passed
@Scotchester
Scotchester deleted the docs/automate-newsletter-addition branch September 1, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

actions Related to GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a GitHub Actions workflow to assist in monthly newsletter archival

3 participants