Change position to relative #12
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: Push-to-EC2 | |
# Trigger deployment only on push to main branch | |
on: | |
push: | |
branches: | |
- aws_stage | |
jobs: | |
deploy: | |
name: Deploy to EC2 on aws_stage branch push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the files | |
uses: actions/checkout@v2 | |
- name: Deploy to Server 1 | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST_DNS }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.EC2_SSH_KEY }} | |
script: | | |
cd ${{ secrets.TARGET_DIR }} | |
sudo git pull origin aws_stage | |
sudo pm2 restart ptwa_npo_prod_run |