-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ Uses the Salesforce CLI to create a manifest from one or more local directories | |
|
||
Supports both pre and post destructive changes. | ||
|
||
![](https://user-images.githubusercontent.com/22826414/185196841-8570dd5f-6560-465b-87ec-4df36f0d9f8d.gif) | ||
|
||
## Usage | ||
|
||
```yml | ||
|
@@ -40,11 +42,11 @@ Supports both pre and post destructive changes. | |
## Example Workflow | ||
|
||
```yml | ||
name: Deploy to Salesforce Production | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
name: Deploy to Salesforce Production | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
@@ -55,22 +57,30 @@ jobs: | |
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
node-version: "14" | ||
- name: Install Dependencies | ||
run: npm install | ||
- name: Cache node modules | ||
uses: actions/cache@v3 | ||
id: npm_cache_id | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm-cache- | ||
${{ runner.os }}- | ||
- name: Install SFDX | ||
run: npm install sfdx-cli --global | ||
- name: Install Dependencies | ||
if: steps.npm_cache_id.outputs.cache-hit != 'true' | ||
run: npm ci | ||
- name: SFDX Auth | ||
env: | ||
SFDX_JWT_KEY: ${{ secrets.SFDX_JWT_KEY }} | ||
SFDX_CLIENT_ID: ${{ secrets.SFDX_CLIENT_ID }} | ||
run: | | ||
echo "${SFDX_JWT_KEY}" > server.key | ||
sfdx force:auth:jwt:grant --clientid "${SFDX_CLIENT_ID}" --jwtkeyfile server.key --username [email protected] --setdefaultdevhubusername | ||
sfdx force:org:display --json -u [email protected] > sfdx-auth.json | ||
npx sfdx force:auth:jwt:grant --clientid "${SFDX_CLIENT_ID}" --jwtkeyfile server.key --username [email protected] --setdefaultdevhubusername | ||
npx sfdx force:org:display --json -u [email protected] > sfdx-auth.json | ||
rm server.key | ||
- name: Build, Test & Deploy | ||
|