Skip to content

Commit

Permalink
BUILD - test ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
vladokuskov committed Mar 19, 2024
1 parent 4adcd68 commit dbfc76b
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check if secrets have data
- name: Checkout code
uses: actions/checkout@v3

- name: Build Docker image
run: docker build . -f ./Dockerfile -t prod-minddaily-image:latest-dev

- name: Save Docker image as tar file
run: |
echo "HOST: ${{ secrets.HOST }}"
echo "PORT: ${{ secrets.PORT }}"
echo "USERNAME: ${{ secrets.USERNAME }}"
echo "SSHKEY: ${{ secrets.SSHKEY }}"
docker save -o prod-minddaily-image.tar prod-minddaily-image:latest-dev
chmod 664 prod-minddaily-image.tar
- uses: actions/checkout@v3
- name: Copy repository contents via scp
- 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: "."
target: /
source: "prod-minddaily-image.tar"
target: "/home/ubuntu"`
- name: Executing remote command
uses: appleboy/ssh-action@master
Expand All @@ -40,5 +43,4 @@ jobs:
port: ${{ secrets.PORT}}
source: '.'
command_timeout: 10m
script: cd dev-folder;
ls
script: ls

0 comments on commit dbfc76b

Please sign in to comment.