Skip to content

chore: [AB#17687] run the Webflow sync scripts when synced content is modified#12682

Open
jphechter wants to merge 1 commit intomainfrom
17687-sync-webflow-in-release
Open

chore: [AB#17687] run the Webflow sync scripts when synced content is modified#12682
jphechter wants to merge 1 commit intomainfrom
17687-sync-webflow-in-release

Conversation

@jphechter
Copy link
Copy Markdown
Contributor

@jphechter jphechter commented Apr 3, 2026

Description

Runs the Webflow sync scripts automatically when content synced to Webflow is updated.

Ticket

This pull request resolves #17687.

Approach

  • Created a new script webflow:run-sync in web/package.json that will run all sync scripts in sequence
  • Added a new step to the content deployment workflow which invokes this script
  • At the end, the workflow will conditionally commit any changes against the content-repo branch
    • Commit message includes [skip ci] to avoid re-triggering the GitHub Action

Steps to Test

Run the workflow, check if the Webflow sync runs in GHA.

Additionally, add a new content item to one of the synced collections. That item should get a new webflowId and that change should be reflected in the file in a new commit.

Notes

Code author checklist

  • I have rebased this branch from the latest main branch
  • I have performed a self-review of my code
  • My code follows the style guide
  • I have created and/or updated relevant documentation on the engineering documentation website
  • I have not used any relative imports
  • I have pruned any instances of unused code
  • I have not added any markdown to labels, titles and button text in config
  • If I added/updated any values in userData (including profileData, formationData etc), then I added a new migration file
  • I have checked for and removed instances of unused config from CMS
  • If I added any new collections to the CMS config, then I updated the search tool and cmsCollections.ts (see CMS Additions in Engineering Reference/FAQ on the engineering documentation site)
  • I have updated relevant .env values in .env-template, in Bitwarden, and in our workspaces
  • I have added the request-reviewer tag on github to request reviews

@jphechter jphechter added the request-review Add this label for Pickaroo to automatically select reviewers from the "business-dev" team label Apr 3, 2026
@jphechter
Copy link
Copy Markdown
Contributor Author

Pending incorporation, I will update the release documentation to remove the manual process of syncing content to Webflow.

@jphechter jphechter force-pushed the 17687-sync-webflow-in-release branch from c8202bf to 89aae90 Compare April 7, 2026 12:40
@jphechter jphechter changed the title chore: [AB#17687] run the Webflow sync scripts during production release GHA workflow chore: [AB#17687] run the Webflow sync scripts when synced content is modified Apr 7, 2026
working-directory: web
shell: bash
env:
WEBFLOW_API_TOKEN: ${{ secrets.WEBFLOW_API_TOKEN }}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added to GHA secrets

Comment on lines +110 to +121
- name: Check for Webflow Content Changes
id: check-changes
shell: bash
run: |
# Check if any files in the Webflow-synced directories have changed
if git diff --name-only origin/main HEAD | grep -qE '^content/src/(roadmaps/industries|licenses|fundings)/'; then
echo "webflow_changes=true" >> $GITHUB_OUTPUT
echo "Changes detected in Webflow-synced content directories"
else
echo "webflow_changes=false" >> $GITHUB_OUTPUT
echo "No changes in Webflow-synced content directories"
fi
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added this to avoid running the sync scripts if no content updates have been made that propagate to Webflow. Line 115 is grep-ing for changes in directories that are synced. This will need to be modified as we expand what is synced.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like it!!!

"test": "cross-env-shell DEBUG_PRINT_LIMIT=50000 jest",
"typecheck": "tsc --noemit",
"typecheck:cypress": "tsc --noemit --project cypress/tsconfig.json",
"webflow:run-sync": "yarn webflow:fundings-sync && yarn webflow:industries-sync && yarn webflow:licenses-sync",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will need to be expanded as we add more scripts to sync content to Webflow.

Comment on lines +139 to +141
- name: Build
shell: bash
run: yarn build
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The build step is required to generate industry.json which is used in the sync.

We're doing a number of builds throughout the workflows that might be able to be pared down and speed up the time to complete the workflows.

Copy link
Copy Markdown
Contributor

@cbrunefearless cbrunefearless left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

request-review Add this label for Pickaroo to automatically select reviewers from the "business-dev" team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants