Merge pull request #1048 from bcgov/Feature-ALR-1246-V1 #836
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
name: PR Code Deployment | |
# Definition when the workflow should run | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- dev | |
paths: | |
- 'src/main/default/**' | |
- 'src-access-mgmt/main/default/**' | |
- 'src-ui/main/default/**' | |
- 'ehis-source/app-contactonboardinglifecycle/main/default/**' | |
- 'ehis-source/app-datasecurity/main/default/**' | |
- 'ehis-source/app-onboardinglifecycle/main/default/**' | |
- 'ehis-source/app-programworkareaassignment/main/default/**' | |
- 'ehis-source/app-segmentationterritories/main/default/**' | |
- 'ehis-source/core/main/default/**' | |
- 'ehis-source/ehis-access-mgmt/main/default/**' | |
- 'ehis-source/ehis-ui/main/default/**' | |
- '.github/workflows/PR_Code_Deployment.yml' | |
- '!sfdx-project.json' | |
# Jobs to be executed | |
jobs: | |
Code-Deploy-Run: | |
runs-on: ubuntu-latest | |
environment: CI | |
env: | |
SFDXAUTHURL: ${{ secrets.SFDXAUTHURL }} | |
steps: | |
# Install Salesforce CLI | |
- name: 'Install Salesforce CLI' | |
run: | | |
wget https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz | |
mkdir ~/sfdx | |
tar xJf sfdx-linux-x64.tar.xz -C ~/sfdx --strip-components 1 | |
echo "$HOME/sfdx/bin" >> $GITHUB_PATH | |
~/sfdx/bin/sfdx version | |
# Checkout the source code | |
- name: 'Checkout source code' | |
uses: actions/checkout@v4 | |
# Authenticate sandbox | |
- name: 'Authenticate Sandbox' | |
run: | | |
echo "${{ env.SFDXAUTHURL }}" > ./authfile | |
sf org login sfdx-url -f authfile -a CI | |
# deploy code without running test classes | |
- name: 'Deploy source code' | |
run: sfdx force:source:deploy --sourcepath ${{ vars.RELEASE_PIPELINE_SOURCEPATH }} --wait 60 --targetusername CI |