Update test-deploy.yml #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |