Skip to content

Ssh

Ssh #36

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '17' # Adjust to the appropriate Node.js version
- name: Install dependencies
run: npm install --force
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEPLOY_RSA }}
known_hosts: unnecessary
- name: Adding Known Hosts
run: ssh-keyscan -H deploy >> ~/.ssh/known_hosts
- name: Build
run: npm run build -prod
- name: Deploy
run: rsync -chavzP --rsh="ssh -l deploy" build/* deploy@ituk.ee:/var/ituk.ee/build
- name: Cleanup SSH keys
run: rm ~/.ssh/id_rsa