Skip to content

BUILD - test ci/cd

BUILD - test ci/cd #21

Workflow file for this run

name: Deploy prod-minddaily-frontend
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build Docker image
run: docker build . -t vladokuskov/prod-minddaily-image:latest
- name: Publush Docker image
run: |
docker login -u vladokuskov -p ${{ secrets.DOCKER_HUB_TOKEN }}
docker push vladokuskov/prod-minddaily-image:latest
# - name: Save Docker image as tar file
# run: |
# docker save -o prod-minddaily-image.tar prod-minddaily-image:latest-prod
# chmod 664 prod-minddaily-image.tar
# - name: Transfer Docker image to remote server
# uses: appleboy/scp-action@master
# with:
# host: ${{ secrets.HOST }}
# port: ${{ secrets.PORT }}
# username: ${{ secrets.USERNAME }}
# key: ${{ secrets.SSHKEY }}
# source: "prod-minddaily-image.tar"
# target: "/home/ubuntu/production-images/"
#
# - name: Executing remote command
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.HOST }}
# username: ${{ secrets.USERNAME }}
# key: ${{ secrets.SSHKEY }}
# port: ${{ secrets.PORT}}
# source: '.'
# command_timeout: 10m
# script: ls