fix: dir path #123
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: Deployment | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Deploy: | |
name: Deploy branch main | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: appleboy-ssh | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.HOST_USERNAME }} | |
key: ${{ secrets.PRIVATE_KEY }} | |
script: | | |
cd python-uri-shortener | |
echo "Welcome!" | |
git pull origin main | |
sudo apt install docker.io -y | |
docker pull nginx:latest | |
sudo systemctl start nginx | |
docker login -u stefnie -p ${{ secrets.docker_hub_token }} | |
docker pull stefnie/api-image:latest | |
docker pull stefnie/api-image:latest | |
sudo nginx -t | |
docker-compose -f compose.yaml up -d |