[CI] Condition adding the SSH key to main branch

Secrets are not available to branches from forked repos, so the SSH
setup step has to be skipped unless the main branch is being used.

Fixes #882
This commit is contained in:
Bryan W. Weber
2020-06-28 21:08:37 -04:00
committed by Ray Speth
parent f4da0bd877
commit df37795a75
+1
View File
@@ -138,6 +138,7 @@ jobs:
# machine that has previously logged in to cantera.org and trusts
# that it logged in to the right machine
- name: Set up SSH key and host for deploy
if: github.event_name == 'push' && github.repository_owner == 'Cantera' && github.ref == 'master'
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.CTDEPLOY_KEY }}