I am assuming you have already installed PWA in your machine and are done with the necessary changes.
So live domain not needed of full repo of pwa-studio its need only a build files to run the project and creating a build we can use below command in the following path :
<<pwa_project_root>>
for example : /var/www/html/pwa-studio/
The command for creating a build :
yarn run build
After successfully run pwa-studio generate one dist folder under below path:
/var/www/html/pwa-studio/packages/venia-concept/dist
so under the dist folder, there are build files generated so copy of all the files and make one folder in Magento root directory called pwa or any other name if you want and paste all the files in that folder.
for example : /var/www/html/magento-project/pwa
Next, you want to make sure Magento_UpwardConnector is already available in your Magento and it should be enabled status if not then please install using the below commands.
composer require magento/module-upward-connector
php bin/magento setup:upgrade
php bin/magento cache:flush
Now, time to connect the upward.yml path in the Magento project folder, and this upward.yml file exists under PWA build directory.
There are 3 or 4 methods are available to connect upward.yml path I will describe two methods.
Method 1:
Run the below command in the terminal:
bin/magento config:set -e web/upward/path /var/www/html/magento-project/pwa/upward.yml
Method 2:
Under env.php add below code in the bottom.
'system' => [
'default' => [
'web' => [
'upward' => [
'path' => '/var/www/html/crosley-cloud/pwa/upward.yml'
]
]
]
]
After this all run the magento necessary commands
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
If you have any questions or feedback so please feel free to ask in the comments or reach me my email address chelumallap@gmail.com
Thank you so much for reading this blog and keep support me and i will coming with the new blog.