Skip to content

Remove old code

Remove old code #17

Workflow file for this run

# Deploys the application
on:
push:
branches: main
jobs:
deploy-api:
name: deploy-api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# - uses: docker/[email protected]
# with:
# push: true
# set: |
# *.cache-from=type=gha
# *.cache-to=type=gha,mode=max
- run: sudo apt-get install sshpass
- run: sshpass -v -p ${{ secrets.DROPLET_PASSWORD }} scp -o StrictHostKeyChecking=no docker-compose.yml root@${{ vars.DROPLET_IP }}
- run: sshpass -v -p ${{ secrets.DROPLET_PASSWORD }} scp -o StrictHostKeyChecking=no Dockerfile root@${{ vars.DROPLET_IP }}
- uses: appleboy/ssh-action@master
with:
host: ${{ vars.DROPLET_IP }}
username: root
password: ${{ secrets.DROPLET_PASSWORD }}
script: |
cd ~
export POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}
docker-compose down
docker-compose pull
docker-compose up -d