Skip to content

Deploy to STAGING

Deploy to STAGING #127

name: Deploy to STAGING
on:
workflow_dispatch:
inputs:
package:
description: 'The ID (starts with 04t) or alias of the package version to install'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 'Install Salesforce CLI'
run: |
wget https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-linux-x64.tar.xz
mkdir ~/sfdx
tar xJf sf-linux-x64.tar.xz -C ~/sfdx --strip-components 1
echo "$HOME/sfdx/bin" >> $GITHUB_PATH
~/sfdx/bin/sf version
- name: Authenticate with Sandbox
run: |
echo ${{ secrets.SALESFORCE_STAGE_AUTH }} > sfdxurl.txt
sf auth:sfdxurl:store --sfdx-url-file sfdxurl.txt --alias SAT-STAGING
- name: Remove auth file
run: rm -f ./sfdxurl.txt
- name: Deploy Source in dev-app-pre
run: sf project deploy start -d dev-app-pre -o SAT-STAGING -w 15
- name: Install version ID
run: sf package install --package "${{ github.event.inputs.package }}" -o SAT-STAGING -b 15 --noprompt --wait 10
- name: Re-deploy default objects
run: sf project deploy start -d force-app/main/default/objects -o SAT-STAGING --ignore-conflicts -w 15
# run: sfdx force:source:deploy -p force-app/main/default/objects,force-app/main/default/queues -u SAT-STAGING -w 15
- name: Re-deploy default queues
run: sf project deploy start -d force-app/main/default/queues -o SAT-STAGING -w 15
- name: Deploy source default OmniStudio-Components
run: sf project deploy start -d OmniStudio-Components -o SAT-STAGING -w 15
- name: Deploy Source in dev-app-post
run: sf project deploy start -d dev-app-post -o SAT-STAGING -w 15 --ignore-conflicts
# - name: Deploy destructive changes
# run: sdfx force:mdapi:deploy --postdestructivechanges destructiveChanges -u SAT-STAGING -o -g -l RunLocalTests -w 15