Skip to content

Merge branch 'backend-test' into backend-dev #35

Merge branch 'backend-test' into backend-dev

Merge branch 'backend-test' into backend-dev #35

Workflow file for this run

name: Docker CI/CD Workflow
on:
push:
branches: [ go-backend, backend-dev ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# Login to Docker Hub (or your container registry), you need to set up secrets in your GitHub repo for this
# - name: Build and Push Docker images
# uses: docker/build-push-action@v2
# with:
# context: .
# file: ./go-backend/Dockerfile
# push: true
# tags: yourusername/yourapp:latest
# Builds and pushes the image to Docker Hub (or your container registry)
- name: Deploy to Server
run: |
sshpass -p "0CI[Ql%eZZuM:" ssh -o StrictHostKeyChecking=no [email protected] "cd /home/ubuntu/backend/A08_V-Helper && git pull && cd go-backend && sudo docker-compose up --build -d"
# Deploys the application on your server using SSH with password authentication