Files
Salesforce-CI-CD/.gitea/workflows/test.yaml
T
head a452e72949
Deploy to production / deploy (push) Failing after 31s
test network
2026-08-08 22:32:22 +02:00

55 lines
1.5 KiB
YAML

name: Deploy to production
run-name: ${{ GITHUB.ACTOR }} pushing to main
on:
push:
branches:
- OrgDestination
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Debug network
run: |
getent hosts gt.routakanki.se || true
curl -vk --connect-timeout 5 https://gt.routakanki.se/ || true
git ls-remote https://gt.routakanki.se/hemppa/Salesforce-CI-CD.git || true
# 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
# Deploy
- name: Deploy
run: |
sf project deploy start \
--source-dir force-app \
--target-org OrgDestination \
--wait 2
# Remove JWT key
- name: Remove JWT key
if: always()
run: rm -f .secrets/server.key \