This template quickstarts the ability of onboarding a new Salesforce org. Quickly get started and enable:
- Relevant Metadata Download
- Deployment Pipeline with GitHub Actions
- Prettier Config
- Open VS Code
- Authenticate with Salesforce using the
sfCLI. - Open the
manifestfolder. - Right click on the
package.xmland selectSFDX: Retrieve Source in Manifest from Org - Delete the
.gitkeepfile inside theforce-appdirectory.
Allow the Metadata API to run and download source data from Salesforce. Customize the package.xml as needed for your needs. For more information check out this video on how to use the metadata api.
Github actions come as default to enable a deployment pipeline. To enable pushing from a staging branch to production:
- Authenticate with
sf cliusing the following command:sf org display --verbose --json -o <MY_TARGET_ORG_ALIAS>. - Copy this value and add to the GitHub variable
SFDX_AUTH_URL. - Ensure the target branch name is correct. The default branch is
master.
To add additional environments, clone the deploy-production.yml and validate-production.yml. To learn more about using a developer pipeline, check out the following tutorial.
We can use SFDMU to move data from Sandbox to Production (Or Vice-Versa).
There are two files that need to be updated in the conga/scripts folder:
push-prod.shrefresh-sb.sh
Replace SB_USERNAME with your Sandbox Alias, and PROD_USERNAME with your Production Alias.
Then, to push changes to production, run:
cd scripts/conga
sh push-prod.shor to refresh sandbox:
cd scripts/conga
sh refresh-sb.shWe can backup the salesforce metadata nighly (or on-demand) using Github Actions.
Learn more by following this tutorial.
To set the time of the backup, edit this cron expression.
- cron: "0 0 * * *"This will run every night at 12am (00:00) UTC.
This template uses the prettier and prettier-apex plugins to auto format.
To configure:
npm install