Update readme.md #2
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: Django Deploy CD | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Deploy to server | |
# don't run locally | |
if: ${{ !env.ACT }} | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.LIVE_SERVER_IP }} | |
username: ${{ secrets.SERVER_USERNAME }} | |
password: ${{ secrets.SERVER_USER_PASSWORD }} | |
port: ${{ secrets.DEPLOY_PORT }} | |
script: | | |
cd ${{ secrets.PROJECT_PATH }} | |
git pull ${{secrets.REPO_URL}} | |
docker ps | grep 8000 | awk '{print $1}' | xargs docker stop > /dev/null | |
docker build -t fsgui . | |
docker run -p 8000:8000 fsgui | |
exit |