Skip to content

test

test #33

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- master
env:
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '17'
- name: Install dependencies
run: npm install --force
- name: install ssh keys
# check this thread to understand why its needed:
# https://stackoverflow.com/a/70447517
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.DEPLOY_RSA }}" > ~/.ssh/id_rsa
ssh-keyscan -H $SSH_HOST > ~/.ssh/known_hosts
- name: Build
run: npm run build -prod
- name: Deploy
run: rsync -chavzP --rsh="ssh -l $SSH_USERNAME" build/* $SSH_USERNAME@$SSH_HOST:/var/ituk.ee/build