summary refs log blame commit diff stats
path: root/.drone.yml
blob: 03eb6d347fa0677a8986debfad97edacf7c93766 (plain) (tree)
1
2
3
4
5
6
7
8







                                                                     


                                       
             
                                                  
                                                                                                                 
 
                                                          

                                                                    
                                                                          
kind: pipeline
name: ssh_and_execute

# Define a step to execute the SSH command on the server
steps:
  - name: ssh_execute
    image: alpine:latest  # Lightweight base image (adjust if needed)
    # Fetch the private key securely from Drone secrets
    environment:
        KEY_DATA:
            from_secret: SSH_KEY_SECRET
    commands:
      # Ensure key data is not accidentally logged
      - echo "$KEY_DATA" | tr -d '\r' > /tmp/drone_key  # Remove carriage returns (if any) and store in temp file

      - chmod 600 /tmp/drone_key  # Set strict permissions

      # Replace with actual server details (host, username, command)
      - ssh crystal@tilde.institute -i /tmp/drone_key "touch hello_im_emu"