In my development org, I created a new page in my site using builder. I then retrieved the entire site with
sfdx force:source:retrieve -m DigitalExperienceConfig:SITE_NAME_HERE
which gave me the new page in the sfdc_cms__route and sfdc_cms__view directories. I then attempted to deploy the new page by deploying the whole directory via
sfdx force:source:deploy --sourcepath force-app/main/default/
When I do that, I get the following error:
Error site/SITE_NAME_HERE.sfdc_cms__route/PageName__c sfdc_cms__view/PageName doesn't exist in this workspace. Add it to the workspace or change the reference to use existing content.:$.activeViewId
Error site/SITE_NAME_HERE.sfdc_cms__view/PageName invalid cross reference id
Is it possible to deploy this with everything else via sfdx or will I be forced to create the page initially in each org before I can push metadata to it?
To try to rule out what I could (like missing lightning components, templates, that sort), I deleted the page in my own org and ended up getting the same error. I also tried updating sfdx-cli to the latest-rc of sfdx and can safely say I get the same error on both 1.188.1 and 1.190.2
UPDATE: I thought I was super clever and retrieved as much metadata as I could from my org. I then created the page and retrieved the metadata again. I then did a diff on the two directories and discovered that the only difference was the view and route, the folders and files I already had in my deploy. A grand dead end.