In this article, I would like to explain this: If the user makes any changes to duplicate page, how to publish the duplicate client side pages to the original page into same site pages library within the same site collection.
As a developer, we have a couple of options to duplicate the page into another modern site collection library or different folder structure, but there is no way to copy the pages within the same modern site collection sites library within the same folder structure.
Prerequisite Steps
Let's create a page and add existing below control, or user can add any other available controls. This is just for demo purposes.
write-host -ForegroundColor Magenta "Page reverted with name of " $targetpage
}
catch {
Write-Host - ForegroundColor Red 'Error ', ':'
$Error[0].ToString();
}
Save and run this script.
OutPut Steps
Applying template to client side pages
Export-PnPClientSidePage Cmdlets applying the PnP Provisioning template and export ".xml" file into shared locaiton. Cmdlets referece can be find here
Creation of client side pages
Apply-PnPProvisioningTemplate cmdlets will create a new page within the same library from download or exported ".xml" file with provided name i.e. pagename _ duplicate
In this article, I would like to explain how to duplicate client side pages which have OOTB webparts and custom SPFx webparts into the same site pages library within the same site collection.
As a developer, we have a couple of options to duplicate the page into another modern site collection library or different folder structure, but there is no way to copy the pages within the same modern site collection site library within the same folder structure.
Prerequisites Steps
Let's create a page and add the exisitng below controls, or the user can add any other available controls. This is just for demo purposes.
write-host -ForegroundColor Magenta "Page Created with name of " $targetpage
}
catch {
Write-Host - ForegroundColor Red 'Error ', ':'
$Error[0].ToString();
Save and run this script.
OutPut Steps
Applying template to client side pages
Export-PnPClientSidePage Cmdlets applying the PnP Provisioning template and export ".xml" file into shared locaiton. Cmdlets referece can be found here
Creation of client side pages
Apply-PnPProvisioningTemplate cmdlets will create a new page within same library from download or exported ".xml" file with provided name i.e. pagename _ duplicate
Implement SPFx (SharePoint Framework) deployment with DevOps using SharePoint ALM Commands & Blob Storage
Azure DevOps (Visual Studio Team Services / Team Foundation Server) consists of a set of tools and services that help developers implement DevOps, Continuous Integration, and Continuous Deployment processes for their development projects.
This article explains the steps involved in setting up your Azure DevOps environment with Continuous Integration and Continuous Deployment to automate your SharePoint Framework builds, unit tests, and deployment.
SharePoint ALM (Application Life Cycle Management) APIs provide simple APIs to manage deployment of your SharePoint Framework solutions and add-ins across your tenant or Site Collection level.
ALM APIs can be used to perform exactly the same operations that are available from a UI perspective
Continuous Integration
Continuous Integration (CI) helps developers integrate code into a shared repository by automatically build and packaging the solution each time new code changes are submitted.
Setting up Azure DevOps for Continuous Integration with a SharePoint Framework solution requires the following steps:
Office Azure & SharePoint ALM - Build Pipeline
Node 10.x
Gulp Clean
Gulp Build
Gulp Bundle --ship
Gulp Package-Solution --ship
Publish Build Artifacts (Task Version 1)
"Display Name" -> Publish Artifact: CDN
"Path to Publish" -> temp/deploy
"Artifact Name" -> CDN
"Artifact Publish Location" -> Azure Pipeline
Publish Build Artifact
"Display Name" -> Publish Artifact: App
"Path to Publish" -> sharepoint/solution
"Artifact Name" -> App
"Artifact Publish Location" -> Azure Pipeline
Continuous Deployment
Continuous Deployment (CD) takes validated code packages from build process and deploys them into a staging or production environment. Developers can track which deployments were successful or not and narrow down issues to specific package versions.
Setting up Azure DevOps for Continuous Deployments with a SharePoint Framework solution requires the following steps:
Implement SPFx (SharePoint Framework) deployment with Azure DevOps Pipeline using Office 365 CLI
Azure DevOps (Visual Studio Team Services / Team Foundation Server) consists of a set of tools and services that help developers implement DevOps, Continuous Integration, and Continuous Deployment processes for their development projects.
This article explains the steps involved in setting up your Azure DevOps environment with Continuous Integration and Continuous Deployment to automate your SharePoint Framework builds, unit tests, and deployment.
Continuous Integration
Continuous Integration (CI) helps developers integrate code into a shared repository by automatically build and packaging the solution each time new code changes are submitted.
Setting up Azure DevOps for Continuous Integration with a SharePoint Framework solution requires the following steps:
Office 365 CLI Build Definition
Node 10.x
Gulp Clean
Gulp Build
Gulp Bundle --ship
Gulp Package-Solution --ship
Copy Files
"Display Name" -> Copy Files To: Copy Files to: $(Build.ArtifactStagingDirectory)/drop
"Publish To Path" -> $(Build.ArtifactStagingDirectory)
"Artifact Name" -> Drop
"Artifact Publish Location" -> Azure Pipelines
Continuous Deployment
Continuous Deployment (CD) takes validated code packages from build process and deploys them into a staging or production environment. Developers can track which deployments were successful or not and narrow down issues to specific package versions.
Setting up Azure DevOps for Continuous Deployments with a SharePoint Framework solution requires the following steps:
Office 365 CLI Release Pipeline
Node 10.x
NPM
"Display Name" -> npm custom
"Command" -> custom
"command and arguments" -> install -g @pnp/office365-cli