36 lines
949 B
YAML
36 lines
949 B
YAML
name: Deploy to production
|
|
run-name: ${{ GITHUB.ACTOR }} pushing to main
|
|
on:
|
|
push:
|
|
branches:
|
|
- OrgDestination
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
# checkout repository
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
|
|
# install Salesforce CLI
|
|
- name: Install Salesforce CLI
|
|
run: npm install --global @salesforce/cli
|
|
|
|
# Create JWT key
|
|
- name: Create JWT key
|
|
run: |
|
|
mkdir -p .secrets
|
|
printf '%s' "${{ secrets.SF_JWT_KEY}}" > .secrets/server.key
|
|
chmod 600 .secrets/server.key
|
|
|
|
# Authenticate
|
|
- name: Authenticate
|
|
run: |
|
|
sf org login jwt \
|
|
--client-id "${{ secrets.SF_CLIENT_ID }}" \
|
|
--jwt-key-file .secrets/server.key \
|
|
--username "${{ vars.SF_DESTINATION_USERNAME }}" \
|
|
--instance-url https://login.salesforce.com \
|
|
--alias OrgDestination
|