Skip to content

Commit

Permalink
Create deploy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
TechwithAnmol authored Oct 7, 2023
1 parent b812802 commit 0909b75
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Push-to-EC2

# Trigger deployment only on push to master branch
on:
push:
branches:
- Actionsdemo

jobs:
deploy:
name: Deploy to EC2 on master branch push
runs-on: ubuntu-latest

steps:
- name: Checkout the files
uses: actions/checkout@v2

- name: Deploy to Server 1
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY }}
REMOTE_HOST: ${{ secrets.HOST_DNS }}
REMOTE_USER: ${{ secrets.USERNAME }}
TARGET: ${{ secrets.TARGET_DIR }}

0 comments on commit 0909b75

Please sign in to comment.