Skip to content

feat: aws condential #139

feat: aws condential

feat: aws condential #139

Workflow file for this run

name: Deployment
env:
AWS_ACCESS_KEY-ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
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
docker system prune -a -f
docker-compose down
docker pull nginx:latest
docker login -u stefnie -p ${{ secrets.docker_hub_token }}
docker pull stefnie/uri-image:latest
docker pull stefnie/api-image:latest
docker-compose -f compose.yaml up -d