Merge pull request #40 from istenith/dev #24
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: CI/CD Pipeline | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up SSH | |
uses: webfactory/ssh-agent@v0.5.1 | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY_ACCESS }} | |
- name: Deploy to EC2 instance | |
run: | | |
ssh -o StrictHostKeyChecking=no lucifer@sumitdhiman.in << EOF | |
cd join.istenith.com | |
git config pull.rebase false | |
git pull origin main | |
docker compose up --build -d | |
EOF |