Skip to content

first job

first job #16

Workflow file for this run

name: Deploy to Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout codecs
uses: actions/checkout@v2
- name: copy file via ssh key
uses: appleboy/[email protected]
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USERNAME }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
echo && hostname
- name: Update Git code on the servers
run: |
ssh ${{ secrets.REMOTE_USERNAME }}@${{ secrets.REMOTE_HOST }} "ls"
- name: Install dependencies
run: |
ssh ${{ secrets.REMOTE_USERNAME }}@${{ secrets.REMOTE_HOST }} "cd /home/ubuntu/devops_class/all_in_docker/client && npm install"
- name: Start the Node.js application
run: |
ssh ${{ secrets.REMOTE_USERNAME }}@${{ secrets.REMOTE_HOST }} "cd /home/ubuntu/devops_class/all_in_docker && npm start"