Skip to content

Update test-deploy.yml #9

Update test-deploy.yml

Update test-deploy.yml #9

Workflow file for this run

name: Create Build
on:
push:
branches:
- deploy-github-action
jobs:
deploy:
name: Deploy to Dev
runs-on: ubuntu-latest
steps:
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/development.key
chmod 600 ~/.ssh/development.key
cat >>~/.ssh/config <<END
Host development
HostName $SSH_HOST
User $SSH_USERNAME
IdentityFile ~/.ssh/development.key
StrictHostKeyChecking no
END
env:
SSH_PORT: ${{secrets.SSH_PORT}}
SSH_HOST: ${{secrets.SSH_HOST}}
SSH_USERNAME: ${{secrets.SSH_USERNAME}}
SSH_KEY: ${{secrets.SSH_KEY}}
- name: Test env
run: |
vi trial.txt
echo "test" >> trial.txt
scp trial.txt development:/
ssh development 'ls -la'