Skip to main content

Power Portals Deployment Using Git Repos from VS Code

 

Open Visual Code - Open New Workspace 

In Vs Code - Extension - Search for - Power Platform VS Code Extension -> Install 

Open Terminal - check for command 

pac  (It gives the version of power cli)

check for Authorization

pac auth list   (if list is there delete the list for fresh start)

pac auth delete --index 1     (if no list is found create auth)

pac auth create --url https://org.crm.dynamics.com/   (it will ask for user name and password )

After successful of creation  -  check for the auth

pac auth list 

To download portals check for paportal

Microsoft Power Platform CLI command for portals is “paportal”.

on the terminal - enter pac

pac (if paportal is there check for the portal list)

pac paportal list  (It will give the website ids of paportals of the organisation)

Connected to...Portal Environment

 Index      WebSiteId                                          Friendly Name

 [1]        xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx               Starter Portal

 Using website id download portals to local path

pac paportal download --path "C:\Users\CRM\Repos" --webSiteId xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx 

after portal download connect to git for commit  - install git on machine - and check git branch

git branch   (if no git is available try to connect to git and clone it the repos)

git clone https://dev.azure.com/trial/Po/_git/repos (it will clone azure repos to local machine)

after connection  - check git branch -  check in the code

git add <foldername/content>   (add all the files to push to the git repos branch)

git commit -am "changes content"  (commit all the changes)

git push  (This will move all the changes to git repos branch)

after push -- connect to target organisation using 

pac auth create --url https://..... (Create new Organisation Auth )

pac auth select --index x  (This will connect to the target organisation - based on target index x value)

upload your changes to the target url 

pac paportal upload --path "Git\Users\CRM\Repos" --deploymentProfile "profile-name"

check your changes on target environment.....



Comments

Popular posts from this blog

Environment Specific Deployment Profiles For Power Portals CLI Upload

Upload portal customisation using Environment specific portals deployment profile.  Example: Deployment profiles for Development, UAT, PROD The deployment Profile allows you to define a set of variables for the environment in YAML format. If you're creating PROD profile, you can create file under deployment-profiles with the name "PROD.deployment.yml" (that is, <profileTag>.deployment.yml).  And you can run command with tag (<profileTag>) to use this profile: example: pac paportal upload --path "X:\portals\starter-portal" --deploymentProfile PROD In this file, you can have the table (entity) name with table ID, list of attributes, and the values that you want to override while uploading the portal configuration using the deploymentProfile parameter adx_contentsnippet:     - adx_contentsnippetid: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx       adx_name: abc\prod       adx_value:  https://abc.com/xyz/prod    - adx_...