chore: [AB#17687] run the Webflow sync scripts when synced content is modified#12682
chore: [AB#17687] run the Webflow sync scripts when synced content is modified#12682
Conversation
|
Pending incorporation, I will update the release documentation to remove the manual process of syncing content to Webflow. |
c8202bf to
89aae90
Compare
| working-directory: web | ||
| shell: bash | ||
| env: | ||
| WEBFLOW_API_TOKEN: ${{ secrets.WEBFLOW_API_TOKEN }} |
There was a problem hiding this comment.
Added to GHA secrets
| - 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 |
There was a problem hiding this comment.
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.
| "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", |
There was a problem hiding this comment.
This will need to be expanded as we add more scripts to sync content to Webflow.
| - name: Build | ||
| shell: bash | ||
| run: yarn build |
There was a problem hiding this comment.
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.
Description
Runs the Webflow sync scripts automatically when content synced to Webflow is updated.
Ticket
This pull request resolves #17687.
Approach
webflow:run-syncinweb/package.jsonthat will run all sync scripts in sequencecontent-repobranch[skip ci]to avoid re-triggering the GitHub ActionSteps 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
webflowIdand that change should be reflected in the file in a new commit.Notes
Code author checklist
userData(includingprofileData,formationDataetc), then I added a new migration filecmsCollections.ts(see CMS Additions in Engineering Reference/FAQ on the engineering documentation site).envvalues in.env-template, in Bitwarden, and in our workspacesrequest-reviewertag on github to request reviews