Skip to content

Workflow file for this run

name: Transfer Build Files
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./all_in_docker/client
steps:
- name: Checkout Repository
uses: actions/checkout@v2
# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: '16'
# - name: Install Dependencies
# run: npm install
# - name: Build Application
# run: CI=false npm run build
# - name: Setup SSH
# uses: shimataro/ssh-key-action@v2
# with:
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# known_hosts: ${{ secrets.KNOWN_HOSTS }}
# - name: Transfer Build Files to Ubuntu Instance
# run: scp -r build/* ${{ secrets.REMOTE_USERNAME }}@${{ secrets.REMOTE_HOST }}:/tmp
- name: executing remote ssh commands using passwordss
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
whoami
sudo apt install docker.io docker-compose
# - name: Transfer Build Files to Ubuntu Instance
# uses: appleboy/scp-action@master
# with:
# host: ${{ secrets.REMOTE_HOST }}
# username: ${{ secrets.REMOTE_USERNAME }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# source: "build"
# target: "/tmp"
# - name: Check ls j
# run: ls
# - name: Check file existence
# id: check_files
# uses: andstor/file-existence-action@v1
# with:
# files: "build"
# allow_failure: true
# - name: Archive Build Files
# uses: actions/upload-artifact@v2
# with:
# name: build
# path: ./build
# transfer-files:
# runs-on: ubuntu-latest
# needs: build
# defaults:
# run:
# working-directory: ./all_in_docker/client
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v2
# - name: Download Build Files
# uses: actions/download-artifact@v2
# with:
# name: build
# path: ./
# - name: Transfer Build Files to Ubuntu Instance
# uses: appleboy/scp-action@master
# with:
# host: ${{ secrets.REMOTE_HOST }}
# username: ${{ secrets.REMOTE_USERNAME }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# source: "build/*"
# target: "/path/on/remote/server/"