Skip to content

updating static location #9

updating static location

updating static location #9

name: Deploy Django to Lightsail
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to Lightsail
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Copy files to Lightsail using SSH
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.LIGHTSAIL_HOST }}
username: ${{ secrets.LIGHTSAIL_USER }}
key: ${{ secrets.LIGHTSAIL_SSH_KEY }}
port: 22
source: "."
target: ${{ github.event.repository.name }}
- name: Run deployment commands on Lightsail
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.LIGHTSAIL_HOST }}
username: ${{ secrets.LIGHTSAIL_USER }}
key: ${{ secrets.LIGHTSAIL_SSH_KEY }}
port: 22
script: |
cd ${{ github.event.repository.name }}
pip install -r requirements.txt
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl restart all