diff --git a/.drone.yml b/.drone.yml index 7f2ce24c..20bbeb51 100644 --- a/.drone.yml +++ b/.drone.yml @@ -101,8 +101,6 @@ steps: - name: Deploy F-Droid Repo commands: - - eval `ssh-agent -s` - - echo "$SSH_PRIVATE_KEY" | ssh-add - - podman unshare ./ci.py --deploy-fdroid-repo environment: SSH_PRIVATE_KEY: diff --git a/ci.py b/ci.py index fcea90f6..600035d2 100755 --- a/ci.py +++ b/ci.py @@ -46,7 +46,10 @@ def deploy_gitea_release(): "--asset", f"{HOST_MOUNTED_VOLUME}/{APP_NAME}-{APP_SEMVER}.tar.zstd"]) def deploy_fdroid_repo(): - subprocess.run(["scp", "-r", f"{HOST_HOME}/fdroid/repo/*", + subprocess.run(["eval $(ssh-agent -s)"], shell=True) + subprocess.run(["printf " + os.environ.get('SSH_PRIVATE_KEY') + " | ssh-add -"], shell=True) + subprocess.run(["scp", "-oStrictHostKeyChecking=no", "-oUserKnownHostsFile=/dev/null", + "-r", f"{HOST_HOME}/fdroid/repo/*", "deployer@selfprivacy.org:/var/www/fdroid.selfprivacy.org"]) if __name__ == "__main__":