updated action #1
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: Deploy Django to Dev EC2 Instance | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.ref }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Set up SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.DEV_BACKEND_SSH_KEY }} | |
- name: Deploy to EC2 | |
env: | |
db_endpoint: ${{ secrets.DB_ENSPOINT }} | |
run: | | |
ssh -o StrictHostKeyChecking=no ubuntu@$ 'echo "$db_endpoint" >' |